Skip to content

Commit

Permalink
Only create an HttpClosedException when a go away frame was received …
Browse files Browse the repository at this point in the history
…otherwise reuse the static shared instance.
  • Loading branch information
vietj committed Nov 16, 2022
1 parent 616cecf commit e87cfcd
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,11 @@ void onStreamWritabilityChanged(Http2Stream s) {
void onStreamClosed(Http2Stream s) {
VertxHttp2Stream stream = s.getProperty(streamKey);
if (stream != null) {
stream.onClose(new HttpClosedException(goAwayStatus));
if (goAwayStatus != null) {
stream.onClose(new HttpClosedException(goAwayStatus));
} else {
stream.onClose(HttpUtils.CLOSED_EXCEPTION);
}
}
checkShutdown();
}
Expand Down

0 comments on commit e87cfcd

Please sign in to comment.