Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Remove listeners to stop them mounting up when connection is kept alive.

  • Loading branch information...
commit 2f96bee4a0e4d8326f3951011fc93f9a432a373d 1 parent 6b2bd86
@tomyan tomyan authored
Showing with 2 additions and 0 deletions.
  1. +2 −0  lib/jsgi-node.js
View
2  lib/jsgi-node.js
@@ -129,7 +129,9 @@ function Response( response, stream ) {
var forEachResult;
if ( typeof data.then === "function" ) {
if(!canceller){
+ stream.removeAllListeners("close");
canceller = function(){
+ stream.removeListener("close", canceller);
cancel && cancel();
}
stream.addListener("close", canceller);
Please sign in to comment.
Something went wrong with that request. Please try again.