changed reconnect strategy
This commit is contained in:
parent
fac7978a4c
commit
4cc7d88235
@ -20,6 +20,7 @@ Socket = Primus.createSocket({
|
||||
transformer: 'websockets',
|
||||
pathname: '/api',
|
||||
timeout: 10000,
|
||||
strategy: 'disconnect,online',
|
||||
plugin: {emitter: Emitter, sparkLatency: Latency}
|
||||
});
|
||||
|
||||
@ -238,7 +239,7 @@ Node.prototype.getLatestBlocks = function()
|
||||
|
||||
Node.prototype.addBlockHistory = function(block)
|
||||
{
|
||||
if(this.blocks.length === 0 || block.number !== this.blocks[0].number)
|
||||
if(this.blocks.length === 0 || (block !== null && block.number !== this.blocks[0].number))
|
||||
{
|
||||
if(this.blocks.length === MAX_BLOCKS_HISTORY)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user