Browse Source

Added timeout to HTTPS request

pull/56/head
Henrik Halvorsen Hortemo 9 years ago
parent
commit
b6be924a8e
1 changed files with 4 additions and 0 deletions
  1. +4
    -0
      lib/client.js

+ 4
- 0
lib/client.js View File

@ -111,6 +111,10 @@ client.prototype.request = function(method, path, params, callback){
});
});
req.setTimeout(30000, function(){
req.abort();
});
// This should only occur for errors such as a socket hang up prior to any
// data being received, or SSL-related issues.
req.on("error", function(err){


Loading…
Cancel
Save