ee-retry
Repeat some action in an exponential increased capped interval
installation
npm install ee-retry
build status
usage
var Retry = require( "ee-retry" );
var try = new Retry( {
min: 100 // 0.1 sec
, max: 60000 // 1 minute
} );
try.on( "try", function( stop ){
// execute somthing
var connection = new Connection();
connection.on( "connect", function(){
// call the finished function
stop();
} );
} );