Permalink
Browse files

merge httpp.js to http.js upstream

  • Loading branch information...
1 parent 5af40d8 commit fb2f155df82980888fd824b8fb3e088f97c23ed0 tom zhou committed Apr 9, 2013
Showing with 2 additions and 2 deletions.
  1. +2 −2 lib/httpp.js
View
4 lib/httpp.js
@@ -514,9 +514,9 @@ OutgoingMessage.prototype._writeRaw = function(data, encoding) {
// ignored in the first place. We'll probably emit 'close' on the
// next tick, but just in case it's not coming, set a timeout that
// will emit it for us.
- if (!this._hangupClose) {
- this._hangupClose = true;
+ if (!this._hangupClose && !this.socket._hangupClose) {
var socket = this.socket;
+ socket._hangupClose = this._hangupClose = true;
var timer = setTimeout(function() {
socket.emit('close');
});

0 comments on commit fb2f155

Please sign in to comment.