Skip to content

Commit

Permalink
Make ChannelOperations.DisposedChannel#close non operational (#3592)
Browse files Browse the repository at this point in the history
DisposedChannel is effective when request/response is terminated and replaces the actual channel.
At that point ChannelOperations.DisposedChannel#close must be non operational.

Fixes #3591
  • Loading branch information
violetagg authored Jan 17, 2025
1 parent 2a0f0c9 commit 2d473c7
Showing 1 changed file with 11 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -709,6 +709,17 @@ static final class DisposedChannel extends AbstractChannel {
this.remoteAddress = actual.remoteAddress();
}

@Override
public ChannelFuture close() {
return newSucceededFuture();
}

@Override
public ChannelFuture close(ChannelPromise promise) {
promise.setSuccess();
return promise;
}

@Override
public ChannelFuture closeFuture() {
return newSucceededFuture();
Expand Down

0 comments on commit 2d473c7

Please sign in to comment.