http: sockets close transitions via _socketClose

This commit is contained in:
Timothy J Fontaine
2015-03-24 13:32:39 -07:00
parent ea56a3690e
commit c20d028652

View File

@@ -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) {