[#798] Not call fireExceptionCaught(..) for outbound operations as the future will get notified anyway and so it is redundant.
Outbound operations are those which are part of the ChannelOutboundInvoker interface.
This commit is contained in:
parent
3e783e1b5e
commit
2903b91e66
@ -560,7 +560,6 @@ public abstract class AbstractChannel extends DefaultAttributeMap implements Cha
|
||||
}
|
||||
|
||||
future.setFailure(t);
|
||||
pipeline.fireExceptionCaught(t);
|
||||
closeFuture.setClosed();
|
||||
}
|
||||
}
|
||||
@ -595,7 +594,6 @@ public abstract class AbstractChannel extends DefaultAttributeMap implements Cha
|
||||
}
|
||||
} catch (Throwable t) {
|
||||
future.setFailure(t);
|
||||
pipeline.fireExceptionCaught(t);
|
||||
closeIfClosed();
|
||||
}
|
||||
} else {
|
||||
@ -776,7 +774,6 @@ public abstract class AbstractChannel extends DefaultAttributeMap implements Cha
|
||||
}
|
||||
} catch (Throwable t) {
|
||||
flushFutureNotifier.notifyFlushFutures(t);
|
||||
pipeline.fireExceptionCaught(t);
|
||||
if (t instanceof IOException) {
|
||||
close(voidFuture());
|
||||
}
|
||||
@ -835,7 +832,6 @@ public abstract class AbstractChannel extends DefaultAttributeMap implements Cha
|
||||
flushFutureNotifier.notifyFlushFutures();
|
||||
} else {
|
||||
flushFutureNotifier.notifyFlushFutures(cause);
|
||||
pipeline.fireExceptionCaught(cause);
|
||||
if (cause instanceof IOException) {
|
||||
close(voidFuture());
|
||||
}
|
||||
@ -852,7 +848,6 @@ public abstract class AbstractChannel extends DefaultAttributeMap implements Cha
|
||||
|
||||
Exception e = new ClosedChannelException();
|
||||
future.setFailure(e);
|
||||
pipeline.fireExceptionCaught(e);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -124,7 +124,6 @@ abstract class AbstractAioChannel extends AbstractChannel {
|
||||
}
|
||||
} catch (Throwable t) {
|
||||
future.setFailure(t);
|
||||
pipeline().fireExceptionCaught(t);
|
||||
closeIfClosed();
|
||||
}
|
||||
} else {
|
||||
@ -154,7 +153,6 @@ abstract class AbstractAioChannel extends AbstractChannel {
|
||||
}
|
||||
} catch (Throwable t) {
|
||||
connectFuture.setFailure(t);
|
||||
pipeline().fireExceptionCaught(t);
|
||||
closeIfClosed();
|
||||
} finally {
|
||||
connectTimeoutFuture.cancel(false);
|
||||
|
@ -391,7 +391,6 @@ public class AioSocketChannel extends AbstractAioChannel implements SocketChanne
|
||||
protected void failed0(Throwable cause, AioSocketChannel channel) {
|
||||
channel.asyncWriteInProgress = false;
|
||||
channel.flushFutureNotifier.notifyFlushFutures(cause);
|
||||
channel.pipeline().fireExceptionCaught(cause);
|
||||
|
||||
// Check if the exception was raised because of an InterruptedByTimeoutException which means that the
|
||||
// write timeout was hit. In that case we should close the channel as it may be unusable anyway.
|
||||
|
@ -178,7 +178,6 @@ abstract class AbstractNioByteChannel extends AbstractNioChannel {
|
||||
} catch (Throwable cause) {
|
||||
region.close();
|
||||
future.setFailure(cause);
|
||||
pipeline().fireExceptionCaught(cause);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -176,7 +176,6 @@ public abstract class AbstractNioChannel extends AbstractChannel {
|
||||
}
|
||||
ChannelFuture connectFuture = AbstractNioChannel.this.connectFuture;
|
||||
if (connectFuture != null && connectFuture.setFailure(connectTimeoutException)) {
|
||||
pipeline().fireExceptionCaught(connectTimeoutException);
|
||||
close(voidFuture());
|
||||
}
|
||||
}
|
||||
@ -185,7 +184,6 @@ public abstract class AbstractNioChannel extends AbstractChannel {
|
||||
}
|
||||
} catch (Throwable t) {
|
||||
future.setFailure(t);
|
||||
pipeline().fireExceptionCaught(t);
|
||||
closeIfClosed();
|
||||
}
|
||||
} else {
|
||||
@ -211,7 +209,6 @@ public abstract class AbstractNioChannel extends AbstractChannel {
|
||||
}
|
||||
} catch (Throwable t) {
|
||||
connectFuture.setFailure(t);
|
||||
pipeline().fireExceptionCaught(t);
|
||||
closeIfClosed();
|
||||
} finally {
|
||||
connectTimeoutFuture.cancel(false);
|
||||
|
@ -296,7 +296,6 @@ public class NioSctpChannel extends AbstractNioMessageChannel implements io.nett
|
||||
future.setSuccess();
|
||||
} catch (Throwable t) {
|
||||
future.setFailure(t);
|
||||
pipeline().fireExceptionCaught(t);
|
||||
}
|
||||
} else {
|
||||
eventLoop().execute(new Runnable() {
|
||||
@ -322,7 +321,6 @@ public class NioSctpChannel extends AbstractNioMessageChannel implements io.nett
|
||||
future.setSuccess();
|
||||
} catch (Throwable t) {
|
||||
future.setFailure(t);
|
||||
pipeline().fireExceptionCaught(t);
|
||||
}
|
||||
} else {
|
||||
eventLoop().execute(new Runnable() {
|
||||
|
@ -71,7 +71,6 @@ abstract class AbstractOioChannel extends AbstractChannel {
|
||||
}
|
||||
} catch (Throwable t) {
|
||||
future.setFailure(t);
|
||||
pipeline().fireExceptionCaught(t);
|
||||
closeIfClosed();
|
||||
}
|
||||
} else {
|
||||
|
@ -266,7 +266,6 @@ public class OioSctpChannel extends AbstractOioMessageChannel
|
||||
future.setSuccess();
|
||||
} catch (Throwable t) {
|
||||
future.setFailure(t);
|
||||
pipeline().fireExceptionCaught(t);
|
||||
}
|
||||
} else {
|
||||
eventLoop().execute(new Runnable() {
|
||||
@ -292,7 +291,6 @@ public class OioSctpChannel extends AbstractOioMessageChannel
|
||||
future.setSuccess();
|
||||
} catch (Throwable t) {
|
||||
future.setFailure(t);
|
||||
pipeline().fireExceptionCaught(t);
|
||||
}
|
||||
} else {
|
||||
eventLoop().execute(new Runnable() {
|
||||
|
Loading…
Reference in New Issue
Block a user