chjj/termcoin

Option to increase the delay prior trying to connect to the newly launched daemon.

Closed this issue · 1 comments

I'm using termcoin on an old P2 266 box, where it takes 6 minutes and 5 seconds to have a freshly loaded Litecoin daemon instance listening on the RPC port.
After launching termcoin it terminates after 30 seconds with the following error:
bin/termcoin:2734
if (err) throw err;
^
Error: connect ECONNREFUSED
at errnoException (net.js:904:11)
at Object.afterConnect as oncomplete

As far as I can see there's a hardcoded limit of 30 reconnect attempts prior terminating:
if (err.code === 'ECONNREFUSED' || err.message === 'socket hang up') {
if (++attempts === 30) {
return callback(err);
}

I think that it would be handy if there's an option to increase that limit from the commandline for users on slower boxes like. :)

Thank you!

Thank you! :)