Skip to content

Commit

Permalink
fix: to schedule the close connection task to run in the channel's ev…
Browse files Browse the repository at this point in the history
…ent loop
  • Loading branch information
dachshu committed Apr 24, 2024
1 parent 1d764aa commit 5820fe9
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -781,7 +781,7 @@ private void handleRequestOrResponseComplete() {
// Stop receiving new requests.
handledLastRequest = true;
if (unfinishedRequests.isEmpty()) {
ctx.executor().schedule(() ->
ctx.channel().eventLoop().schedule(() ->
ctx.writeAndFlush(Unpooled.EMPTY_BUFFER).addListener(CLOSE),
Flags.defaultHttp1ConnectionCloseDelayMillis(), TimeUnit.MILLISECONDS);
}
Expand Down

0 comments on commit 5820fe9

Please sign in to comment.