[#2159] Not fail the ChannelPromise with WriteTimeoutException to prevent warning

This commit is contained in:
Norman Maurer 2014-01-29 13:56:42 +01:00
parent 96f94cfcb1
commit b3e4122499

View File

@ -111,8 +111,10 @@ public class WriteTimeoutHandler extends ChannelHandlerAdapter {
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) {