Skip to content

Commit

Permalink
prefer more explicit removeResponse method
Browse files Browse the repository at this point in the history
  • Loading branch information
jrhee17 committed Nov 23, 2021
1 parent 7d207f9 commit dca247c
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ public void onStreamHalfClosed(Http2Stream stream) {}
public void onStreamClosed(Http2Stream stream) {
goAwayHandler.onStreamClosed(channel(), stream);

final HttpResponseWrapper res = getResponse(streamIdToId(stream.id()), true);
final HttpResponseWrapper res = removeResponse(streamIdToId(stream.id()));
if (res == null) {
return;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,11 +93,6 @@ final HttpResponseWrapper getResponse(int id) {
return responses.get(id);
}

@Nullable
final HttpResponseWrapper getResponse(int id, boolean remove) {
return remove ? removeResponse(id) : getResponse(id);
}

@Nullable
final HttpResponseWrapper removeResponse(int id) {
if (closing) {
Expand Down

0 comments on commit dca247c

Please sign in to comment.