Skip to content

Commit

Permalink
fix bytesWritten undefined
Browse files Browse the repository at this point in the history
  • Loading branch information
tinchoz49 committed Apr 24, 2024
1 parent 3fc1f85 commit f227d7a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/http-socket.js
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ function drain (socket, res, data, cb) {
done = res.write(getChunk(data))
if (done) {
socket.writableNeedDrain = false
this.bytesWritten += byteLength(data)
socket.bytesWritten += byteLength(data)
socket.removeListener('close', onClose)
socket.removeListener('drain', onDrain)
cb()
Expand Down

0 comments on commit f227d7a

Please sign in to comment.