Home / Function/ closeOnReadError() — netty Function Reference

closeOnReadError() — netty Function Reference

Architecture documentation for the closeOnReadError() function in AbstractNioMessageChannel.java from the netty codebase.

Entity Profile

Dependency Diagram

graph TD
  41047431_2be4_b405_cf1b_592f5cad83f1["closeOnReadError()"]
  3260bc77_49cf_96c1_baa9_dd1de8d3603d["AbstractNioMessageChannel"]
  41047431_2be4_b405_cf1b_592f5cad83f1 -->|defined in| 3260bc77_49cf_96c1_baa9_dd1de8d3603d
  fdaeb6e3_b1a0_895b_8d25_cbfe40e8b726["read()"]
  fdaeb6e3_b1a0_895b_8d25_cbfe40e8b726 -->|calls| 41047431_2be4_b405_cf1b_592f5cad83f1
  style 41047431_2be4_b405_cf1b_592f5cad83f1 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

transport/src/main/java/io/netty/channel/nio/AbstractNioMessageChannel.java lines 180–194

    protected boolean closeOnReadError(Throwable cause) {
        if (!isActive()) {
            // If the channel is not active anymore for whatever reason we should not try to continue reading.
            return true;
        }
        if (cause instanceof PortUnreachableException) {
            return false;
        }
        if (cause instanceof IOException) {
            // ServerChannel should not be closed even on IOException because it can often continue
            // accepting incoming connections. (e.g. too many open files)
            return !(this instanceof ServerChannel);
        }
        return true;
    }

Domain

Subdomains

Called By

Frequently Asked Questions

What does closeOnReadError() do?
closeOnReadError() is a function in the netty codebase, defined in transport/src/main/java/io/netty/channel/nio/AbstractNioMessageChannel.java.
Where is closeOnReadError() defined?
closeOnReadError() is defined in transport/src/main/java/io/netty/channel/nio/AbstractNioMessageChannel.java at line 180.
What calls closeOnReadError()?
closeOnReadError() is called by 1 function(s): read.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free