Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

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

  • Loading branch information...
commit 2f96bee4a0e4d8326f3951011fc93f9a432a373d 1 parent 6b2bd86
Tom Yandell authored February 22, 2011

Showing 1 changed file with 2 additions and 0 deletions. Show diff stats Hide diff stats

  1. 2  lib/jsgi-node.js
2  lib/jsgi-node.js
@@ -129,7 +129,9 @@ function Response( response, stream ) {
129 129
     var forEachResult;
130 130
     if ( typeof data.then === "function" ) {
131 131
       if(!canceller){
  132
+        stream.removeAllListeners("close");
132 133
         canceller = function(){
  134
+          stream.removeListener("close", canceller);
133 135
           cancel && cancel();
134 136
         }
135 137
         stream.addListener("close", canceller);

0 notes on commit 2f96bee

Please sign in to comment.
Something went wrong with that request. Please try again.