summaryrefslogtreecommitdiff
path: root/lib/_http_common.js
diff options
context:
space:
mode:
Diffstat (limited to 'lib/_http_common.js')
-rw-r--r--lib/_http_common.js12
1 files changed, 12 insertions, 0 deletions
diff --git a/lib/_http_common.js b/lib/_http_common.js
index 40a4b11840..8c97886272 100644
--- a/lib/_http_common.js
+++ b/lib/_http_common.js
@@ -220,3 +220,15 @@ function freeParser(parser, req) {
}
}
exports.freeParser = freeParser;
+
+
+function ondrain() {
+ if (this._httpMessage) this._httpMessage.emit('drain');
+}
+
+
+function httpSocketSetup(socket) {
+ socket.removeListener('drain', ondrain);
+ socket.on('drain', ondrain);
+}
+exports.httpSocketSetup = httpSocketSetup;