removed seemingly unnecessary resetRetriesCheck function
the function being set to fire after 100ms conflicted with delays in firing the 'disconnect' event on windows, and this resulted in the socket's 'retriesRemianing' being reset after every decrement and thus violatin the 'maxRetries' rule
This commit is contained in:
parent
b60152d0b3
commit
d3181ddafe
1 changed files with 0 additions and 11 deletions
|
@ -160,21 +160,10 @@ function connect(){
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
client.isRetrying=true;
|
|
||||||
|
|
||||||
setTimeout(
|
setTimeout(
|
||||||
function retryTimeout(){
|
function retryTimeout(){
|
||||||
client.retriesRemaining--;
|
client.retriesRemaining--;
|
||||||
client.isRetrying=false;
|
|
||||||
client.connect();
|
client.connect();
|
||||||
setTimeout(
|
|
||||||
function resetRetriesCheck(){
|
|
||||||
if(!client.isRetrying){
|
|
||||||
client.retriesRemaining=client.config.maxRetries;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
100
|
|
||||||
);
|
|
||||||
}.bind(null,client),
|
}.bind(null,client),
|
||||||
client.config.retry
|
client.config.retry
|
||||||
);
|
);
|
||||||
|
|
Loading…
Reference in a new issue