Skip to content

Commit 2811b0c

Browse files
committed
http_server: prefinish vs finish
Do not detach the socket from the response until all data is actually sent to the other side. See: nodejs#1373
1 parent b6b37a5 commit 2811b0c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/_http_server.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -429,7 +429,7 @@ function connectionListener(socket) {
429429

430430
// When we're finished writing the response, check if this is the last
431431
// respose, if so destroy the socket.
432-
res.on('prefinish', resOnFinish);
432+
res.on('finish', resOnFinish);
433433
function resOnFinish() {
434434
// Usually the first incoming element should be our request. it may
435435
// be that in the case abortIncoming() was called that the incoming

0 commit comments

Comments
 (0)