Browse Source

Merge pull request #56 from patchu/master

Added timeout to HTTPS request
pull/57/head
Brett Langdon 9 years ago
committed by GitHub
parent
commit
74090c03aa
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