Created
September 29, 2011 00:14
-
-
Save nodesocket/1249665 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/lib/net.js b/lib/net.js | |
index 4af00b4..9565b38 100644 | |
--- a/lib/net.js | |
+++ b/lib/net.js | |
@@ -350,8 +350,9 @@ Socket.prototype.write = function(data /* [encoding], [fd], [cb] */) { | |
this._writeQueueCallbacks[last] = cb; | |
} else { | |
// awful | |
+ var original = this._writeQueueCallbacks[last]; | |
this._writeQueueCallbacks[last] = function() { | |
- this._writeQueueCallbacks[last](); | |
+ original(); | |
cb(); | |
}; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment