Added start retry times as an option for bitcoin startup.
This commit is contained in:
parent
cef4088908
commit
df38a6b838
@ -25,6 +25,9 @@ function Bitcoin(options) {
|
||||
this.subscriptions.rawtransaction = [];
|
||||
this.subscriptions.hashblock = [];
|
||||
|
||||
this.startRetryTimes = this.options.startRetryTimes || 120;
|
||||
this.startRetryInterval = this.options.startRetryInterval || 1000;
|
||||
|
||||
this._initClients();
|
||||
|
||||
this._process = options.process || process;
|
||||
@ -317,7 +320,7 @@ Bitcoin.prototype._connectProcess = function(config, callback) {
|
||||
var node = {};
|
||||
var exitShutdown = false;
|
||||
|
||||
async.retry({times: 60, interval: self.startRetryInterval}, function(done) {
|
||||
async.retry({times: self.startRetryTimes, interval: self.startRetryInterval}, function(done) {
|
||||
if (self.node.stopping) {
|
||||
exitShutdown = true;
|
||||
return done();
|
||||
|
||||
Loading…
Reference in New Issue
Block a user