Skip to content

Commit

Permalink
Complete H2 reset promise as soon as the reset frame has been sent.
Browse files Browse the repository at this point in the history
Motivation:

The recent changes in HTTP reset API introduced a returned future to signal when the stream reset is performed. The implementation completes the future when the stream reset has been written, instead we should complete it as soon as the frame is written.

Changes:

Complete the H2 reset future after the reset frame has been written.
  • Loading branch information
vietj committed Dec 10, 2024
1 parent f4dfd01 commit 6f6e5ab
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -325,12 +325,12 @@ protected void doWriteReset(long code, Promise<Void> promise) {
streamId = stream != null ? stream.id() : -1;
}
if (streamId != -1) {
conn.handler.writeReset(streamId, code, (PromiseInternal<Void>) promise);
conn.handler.writeReset(streamId, code, null);
} else {
// Reset happening before stream allocation
handleReset(code);
promise.complete();
}
promise.complete();
}

void handleWriteQueueDrained() {
Expand Down

0 comments on commit 6f6e5ab

Please sign in to comment.