Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nodejs/node.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRyan Dahl <ry@tinyclouds.org>2011-01-04 21:36:05 +0300
committerRyan Dahl <ry@tinyclouds.org>2011-01-04 21:36:05 +0300
commit73f4ec51fde3bfb3e16d6d706aae42656d083c1a (patch)
tree974b230036147f19359ea92df7884a591103c579 /lib/http.js
parent94f8368cf9e5077050525e32a24188402f077074 (diff)
hack for ending https connections
Diffstat (limited to 'lib/http.js')
-rw-r--r--lib/http.js14
1 files changed, 10 insertions, 4 deletions
diff --git a/lib/http.js b/lib/http.js
index 786f373e743..f061effe331 100644
--- a/lib/http.js
+++ b/lib/http.js
@@ -833,11 +833,17 @@ function connectionListener(socket) {
if (message._last) {
// No more messages to be pushed out.
- // HACK: need way to do this with socket interface
- if (socket._writeQueue.length) {
- socket.__destroyOnDrain = true; //socket.end();
+ if (!socket._writeQueue) {
+ // Putting this here for https. Really need to add below hack to
+ // both socket and https interfaces.
+ socket.end();
} else {
- socket.destroy();
+ // HACK: need way to do this with socket interface
+ if (socket._writeQueue.length) {
+ socket.__destroyOnDrain = true; //socket.end();
+ } else {
+ socket.destroy();
+ }
}
} else if (socket._outgoing.length) {