[#2159] Not fail the ChannelPromise with WriteTimeoutException to prevent warning
This commit is contained in:
parent
80ed147652
commit
37e6588845
@ -112,8 +112,10 @@ public class WriteTimeoutHandler extends ChannelOutboundHandlerAdapter {
|
||||
final ScheduledFuture<?> sf = ctx.executor().schedule(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
if (future.tryFailure(WriteTimeoutException.INSTANCE)) {
|
||||
// If succeeded to mark as failure, notify the pipeline, too.
|
||||
// Was not written yet so issue a write timeout
|
||||
// The future itself will be failed with a ClosedChannelException once the close() was issued
|
||||
// See https://github.com/netty/netty/issues/2159
|
||||
if (!future.isDone()) {
|
||||
try {
|
||||
writeTimedOut(ctx);
|
||||
} catch (Throwable t) {
|
||||
|
Loading…
Reference in New Issue
Block a user