Skip to content

Commit 854a071

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 159577c commit 854a071

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/_http_server.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -432,7 +432,7 @@ function connectionListener(socket) {
432432

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

0 commit comments

Comments
 (0)