Skip to content
This repository has been archived by the owner on Feb 16, 2020. It is now read-only.

Commit

Permalink
only timeout kraken after 60 seconds, hopefully fixes #931
Browse files Browse the repository at this point in the history
  • Loading branch information
askmike committed Aug 22, 2017
1 parent 2a7344d commit af7519b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
8 changes: 6 additions & 2 deletions exchanges/kraken.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,11 +75,15 @@ var Trader = function(config) {
this.name = 'kraken';
this.since = null;

this.kraken = new Kraken(this.key, this.secret);
this.kraken = new Kraken(
this.key,
this.secret,
{timeout: +moment.duration(60, 'seconds')}
);
}

Trader.prototype.retry = function(method, args) {
var wait = +moment.duration(10, 'seconds');
var wait = +moment.duration(5, 'seconds');
log.debug(this.name, 'returned an error, retrying..');

var self = this;
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
"koa-logger": "^1.3.0",
"koa-router": "^5.4.0",
"koa-static": "^2.0.0",
"kraken-api": "0.1.x",
"kraken-api": "^1.0.0",
"lakebtc_nodejs": "0.1.x",
"lodash": "2.x",
"moment": "2.4.x",
Expand Down

0 comments on commit af7519b

Please sign in to comment.