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:
Mostafa Samir 2016-04-01 20:26:26 +02:00
parent b60152d0b3
commit d3181ddafe
1 changed files with 0 additions and 11 deletions

View File

@ -160,21 +160,10 @@ function connect(){
return;
}
client.isRetrying=true;
setTimeout(
function retryTimeout(){
client.retriesRemaining--;
client.isRetrying=false;
client.connect();
setTimeout(
function resetRetriesCheck(){
if(!client.isRetrying){
client.retriesRemaining=client.config.maxRetries;
}
},
100
);
}.bind(null,client),
client.config.retry
);