Permalink
Browse files

[minor] Close open connections. Fixes #178

  • Loading branch information...
1 parent ee38824 commit 0cf81270e9d570014a814819bbfb6f120ea5b0f4 @3rd-Eden committed Jul 2, 2013
Showing with 2 additions and 0 deletions.
  1. +2 −0 lib/transports/polling.js
View
2 lib/transports/polling.js
@@ -174,6 +174,8 @@ Polling.prototype.onData = function (data) {
parser.decodePayload(data, function(packet){
if ('close' == packet.type) {
debug('got xhr close packet');
+ if (self.request) self.request.connection.destroy();
+ if (self.res) self.res.end();
self.onClose();
return false;
}

0 comments on commit 0cf8127

Please sign in to comment.