Skip to content
This repository has been archived by the owner on Apr 22, 2023. It is now read-only.

Commit

Permalink
hack for ending https connections
Browse files Browse the repository at this point in the history
  • Loading branch information
ry committed Jan 4, 2011
1 parent 94f8368 commit 73f4ec5
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions lib/http.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 73f4ec5

Please sign in to comment.