Browse Source

call callback on connection error

patch-2
Matias Alejo Garcia 11 years ago
parent
commit
80343227bc
  1. 4
      RpcClient.js

4
RpcClient.js

@ -180,7 +180,9 @@ function ClassSpec(b) {
});
});
req.on('error', function(e) {
log.err('Could not connect to bitcoin via RPC: '+e);
var err = new Error('Could not connect to bitcoin via RPC: '+e.message);
log.err(err);
callback(err);
});
req.setHeader('Content-Length', request.length);

Loading…
Cancel
Save