handleWriteError() — netty Function Reference
Architecture documentation for the handleWriteError() function in AbstractChannel.java from the netty codebase.
Entity Profile
Dependency Diagram
graph TD 7304e576_dd6e_3305_cf0d_edd0fc40c205["handleWriteError()"] 330d05c9_85ca_2e57_92f5_e996fb442b81["AbstractUnsafe"] 7304e576_dd6e_3305_cf0d_edd0fc40c205 -->|defined in| 330d05c9_85ca_2e57_92f5_e996fb442b81 ae5386b7_9fd3_54fd_2f3c_29a33b11e74f["flush0()"] ae5386b7_9fd3_54fd_2f3c_29a33b11e74f -->|calls| 7304e576_dd6e_3305_cf0d_edd0fc40c205 3247fe36_e8dd_2a94_aca8_58f72f5210e8["close()"] 7304e576_dd6e_3305_cf0d_edd0fc40c205 -->|calls| 3247fe36_e8dd_2a94_aca8_58f72f5210e8 ae5386b7_9fd3_54fd_2f3c_29a33b11e74f["flush0()"] 7304e576_dd6e_3305_cf0d_edd0fc40c205 -->|calls| ae5386b7_9fd3_54fd_2f3c_29a33b11e74f e95fc83e_066e_406e_f5b1_0ff28fed8f37["shutdownOutput()"] 7304e576_dd6e_3305_cf0d_edd0fc40c205 -->|calls| e95fc83e_066e_406e_f5b1_0ff28fed8f37 style 7304e576_dd6e_3305_cf0d_edd0fc40c205 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
transport/src/main/java/io/netty/channel/AbstractChannel.java lines 802–822
protected final void handleWriteError(Throwable t) {
if (t instanceof IOException && config().isAutoClose()) {
/**
* Just call {@link #close(ChannelPromise, Throwable, boolean)} here which will take care of
* failing all flushed messages and also ensure the actual close of the underlying transport
* will happen before the promises are notified.
*
* This is needed as otherwise {@link #isActive()} , {@link #isOpen()} and {@link #isWritable()}
* may still return {@code true} even if the channel should be closed as result of the exception.
*/
initialCloseCause = t;
close(voidPromise(), t, newClosedChannelException(t, "flush0()"));
} else {
try {
shutdownOutput(voidPromise(), t);
} catch (Throwable t2) {
initialCloseCause = t;
close(voidPromise(), t2, newClosedChannelException(t, "flush0()"));
}
}
}
Domain
Subdomains
Called By
Source
Frequently Asked Questions
What does handleWriteError() do?
handleWriteError() is a function in the netty codebase, defined in transport/src/main/java/io/netty/channel/AbstractChannel.java.
Where is handleWriteError() defined?
handleWriteError() is defined in transport/src/main/java/io/netty/channel/AbstractChannel.java at line 802.
What does handleWriteError() call?
handleWriteError() calls 3 function(s): close, flush0, shutdownOutput.
What calls handleWriteError()?
handleWriteError() is called by 1 function(s): flush0.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free