Skip to content

Commit 9f3946a

Browse files
indutnyrvagg
authored andcommitted
http_server: prefinish vs finish
Do not detach the socket from the response until all data is actually sent to the other side. See: #1373 PR-URL: #1411 Reviewed-By: Chris Dickinson <christopher.s.dickinson@gmail.com> Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
1 parent cb80141 commit 9f3946a

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
@@ -431,7 +431,7 @@ function connectionListener(socket) {
431431

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

0 commit comments

Comments
 (0)