Skip to content

Commit 3b86c4d

Browse files
committed
Update changeset
1 parent 2064db7 commit 3b86c4d

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

.changeset/whole-planes-mate.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,7 @@ It is actually a bug in `compression` package;
1111
[expressjs/compression#46](https://github.com/expressjs/compression/issues/46)
1212
But since it is a common mistake, we prefer to workaround this on our end.
1313

14-
So now the server adapter calls `response.end` immediately after `response.write` for static responses.
14+
Now after calling `response.write`, it no longer uses callback but first it checks the result;
15+
16+
if it is `true`, it means stream is drained and we can call `response.end` immediately.
17+
else if it is `false`, it means the stream is not drained yet, so we can wait for the `drain` event to call `response.end`.

0 commit comments

Comments
 (0)