Skip to content

Commit 857e310

Browse files
Stream piping abort fix
1 parent 117a98e commit 857e310

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "uquik",
3-
"version": "1.0.34",
3+
"version": "1.0.35",
44
"description": "uQuik HTTP(S) framework",
55
"main": "index.js",
66
"scripts": {

src/Response.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -269,6 +269,7 @@ class Response extends Writable {
269269
// Wait for this chunk to be written to the client
270270
let drained = false
271271
return this.drain(() => {
272+
if (this.completed) return true
272273
// Call the callback once the chunk is drained
273274
if (!drained) {
274275
drained = true

0 commit comments

Comments
 (0)