Browse files

Merge git://github.com/lpatters/promised-io

  • Loading branch information...
2 parents b1f6830 + 3bc3702 commit 2375adf9058f43320f76d18868dc63db2f2d0f85 @kriszyp committed Aug 23, 2011
Showing with 2 additions and 1 deletion.
  1. +2 −1 engines/node/http-client.js
View
3 engines/node/http-client.js
@@ -20,6 +20,7 @@ exports.request = function(originalRequest){
}
}
+ if(request.timeout === undefined)request.timeout= 20000; // default timeout.
if(request.url){
var parsed = parse(request.url);
if (parsed.pathname) {
@@ -50,7 +51,7 @@ exports.request = function(originalRequest){
timedOut = true;
client.destroy();
deferred.reject(new Error("Timeout"));
- }, 20000);
+ }, request.timeout);
var secure = request.protocol.indexOf("s") > -1;
request.port = request.port || (secure ? 443 : 80);

0 comments on commit 2375adf

Please sign in to comment.