Skip to content

Commit

Permalink
add KEEPALIVE OPTION
Browse files Browse the repository at this point in the history
  • Loading branch information
you21979 committed Mar 19, 2017
1 parent 3edaa8e commit f2f511a
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions lib/constant.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@ exports.OPT_WEBSOCKET_URL = 'wss://api.poloniex.com';
exports.OPT_LIMIT_SEC = 0.2;
exports.OPT_LIMIT_HOST = 'https://poloniex.com';
exports.OPT_TIMEOUT_SEC = 30;
exports.OPT_KEEPALIVE = false;
1 change: 1 addition & 0 deletions lib/private_api.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ var createPostOption = function(url, nonce, api_key, secret_key, user_agent, tim
url: url,
method: 'POST',
form: qs,
forever:constant.OPT_KEEPALIVE,
headers: createHeader(api_key, secret_key, user_agent, qs),
timeout : timeout,
transform2xxOnly: true,
Expand Down
1 change: 1 addition & 0 deletions lib/public_api.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ var createGetOption = function(url, user_agent, qs){
return {
url: url + '?' + qs,
method: 'GET',
forever:constant.OPT_KEEPALIVE,
headers: createHeader(user_agent),
timeout : Math.floor(constant.OPT_TIMEOUT_SEC * 1000),
transform2xxOnly: true,
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"author": "Yuki Akiyama <you2197901 [at] gmail.com>",
"name": "@you21979/poloniex.com",
"version": "0.0.8",
"version": "0.0.9",
"private": false,
"dependencies": {
"autobahn" : "0.10.x",
Expand Down

0 comments on commit f2f511a

Please sign in to comment.