Skip to content

Commit

Permalink
recomment
Browse files Browse the repository at this point in the history
  • Loading branch information
enisdenjo committed Aug 22, 2023
1 parent 6b22311 commit a2c8622
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/use/express.ts
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ export function createHandler<Context extends OperationContext = undefined>(
res.once('close', body.return);
for await (const value of body) {
if (res.closed) {
// for cases where the "close" event is late
// response's close event might be late
break;
}
await new Promise<void>((resolve, reject) =>
Expand Down
2 changes: 1 addition & 1 deletion src/use/fastify.ts
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ export function createHandler<Context extends OperationContext = undefined>(
reply.raw.once('close', body.return);
for await (const value of body) {
if (reply.raw.closed) {
// for cases where the "close" event is late
// response's close event might be late
break;
}
await new Promise<void>((resolve, reject) =>
Expand Down
2 changes: 1 addition & 1 deletion src/use/http.ts
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ export function createHandler<Context extends OperationContext = undefined>(
res.once('close', body.return);
for await (const value of body) {
if (res.closed) {
// for cases where the "close" event is late
// response's close event might be late
break;
}
await new Promise<void>((resolve, reject) =>
Expand Down
2 changes: 1 addition & 1 deletion src/use/http2.ts
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ export function createHandler<Context extends OperationContext = undefined>(
res.once('close', body.return);
for await (const value of body) {
if (res.closed) {
// for cases where the "close" event is late
// response's close event might be late
break;
}
await new Promise<void>((resolve, reject) =>
Expand Down

0 comments on commit a2c8622

Please sign in to comment.