ee-retry

Repeat some action in an exponential increased capped interval

npm install ee-retry
4 downloads in the last month

ee-retry

Repeat some action in an exponential increased capped interval

installation

npm install ee-retry

build status

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();
    } );
} );
npm loves you