Fixed a problem where HttpTunnelingClientSocketChannel.setInterestOps() returns a wrong future
This commit is contained in:
parent
f0233fc1b8
commit
6805ea719b
@ -146,8 +146,20 @@ class HttpTunnelingClientSocketChannel extends AbstractChannel
|
||||
|
||||
@Override
|
||||
public ChannelFuture setInterestOps(int interestOps) {
|
||||
// TODO: Wrap the future.
|
||||
return channel.setInterestOps(interestOps);
|
||||
final ChannelFuture future = future(this);
|
||||
channel.setInterestOps(interestOps).addListener(new ChannelFutureListener() {
|
||||
public void operationComplete(ChannelFuture f)
|
||||
throws Exception {
|
||||
if (f.isSuccess()) {
|
||||
future.setSuccess();
|
||||
fireChannelInterestChanged(HttpTunnelingClientSocketChannel.this);
|
||||
} else {
|
||||
future.setFailure(f.getCause());
|
||||
fireExceptionCaught(HttpTunnelingClientSocketChannel.this, f.getCause());
|
||||
}
|
||||
}
|
||||
});
|
||||
return future;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
Loading…
Reference in New Issue
Block a user