summaryrefslogtreecommitdiff
path: root/lib/http.js
diff options
context:
space:
mode:
authorRyan Dahl <ry@tinyclouds.org>2011-07-14 15:52:08 -0700
committerRyan Dahl <ry@tinyclouds.org>2011-07-14 15:52:08 -0700
commit041c9832902f1258c6b0f93a5d0e800cdfa70f5b (patch)
treebe0a04fd735ce28d6ab5fc8dc71a5eb3f63d5a0b /lib/http.js
parentab0d88142ec7fa7f6e7954a8c1fd3a9e1a9c9191 (diff)
parent8caf7fdb05b29325c57807074d55fa3f2713d197 (diff)
downloadnode-041c9832902f1258c6b0f93a5d0e800cdfa70f5b.tar.gz
Merge branch 'v0.4'
Conflicts: deps/libev/wscript doc/api/modules.markdown
Diffstat (limited to 'lib/http.js')
-rw-r--r--lib/http.js5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/http.js b/lib/http.js
index af36d5f01..b61be6538 100644
--- a/lib/http.js
+++ b/lib/http.js
@@ -1325,7 +1325,10 @@ Agent.prototype._establishNewConnection = function() {
debug('AGENT socket keep-alive');
}
- req.detachSocket(socket);
+ // The socket may already be detached and destroyed by an abort call
+ if (socket._httpMessage) {
+ req.detachSocket(socket);
+ }
assert(!socket._httpMessage);