summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/_http_server.js5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/_http_server.js b/lib/_http_server.js
index 7ca307ca2..926f3abfc 100644
--- a/lib/_http_server.js
+++ b/lib/_http_server.js
@@ -152,7 +152,10 @@ function onServerResponseClose() {
// Ergo, we need to deal with stale 'close' events and handle the case
// where the ServerResponse object has already been deconstructed.
// Fortunately, that requires only a single if check. :-)
- if (this._httpMessage) this._httpMessage.emit('close');
+ if (this._httpMessage) {
+ this._httpMessage.emit('_socketClose');
+ this._httpMessage.emit('close');
+ }
}
ServerResponse.prototype.assignSocket = function(socket) {