You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
socket: interrupted (EINTR) plain TCP reads/writes and TLS reads are reported as errors #1799
#1795 made flush_tls (lib/src/socket.rs) retry a write the kernel interrupted (EINTR, ErrorKind::Interrupted). The other socket paths in lib/src/socket.rs still map it to SocketResult::Error:
tcp_socket_write (plain TCP socket_write of TcpStream and SessionTcpStream): every error other than WouldBlock, ConnectionReset, ConnectionAborted, BrokenPipe and ConnectionRefused falls into the generic arm;
tcp_socket_write_vectored (plain socket_write_vectored): same mapping;
plain_socket_read (plain socket_read): same mapping;
rustls_socket_read (FrontRustls::socket_read): rustls's read_tls propagates the transport's Interrupted (only complete_io retries it), and the pass reports it as RustlsReadFault::ReadTls / Error.
EINTR says nothing about the socket, so it must neither end the call as an error nor as WouldBlock. A caller that closes on Error closes a healthy session: the pipe path already does on a front write (lib/src/protocol/pipe.rs, "front socket write error"), and #1793 makes the H1 and h2c mux paths close a session whose client write failed.
Expected: retry the syscall on Interrupted, as flush_tls, the relay (lib/src/protocol/proxy_protocol/relay.rs), the UDP path (lib/src/udp.rs), the lingering-close read (lib/src/protocol/mux/shared.rs) and std's write_all do.
Related, not covered here: the TLS handshake pump (handshake_read and the write_tls arm of the handshake loop in lib/src/protocol/rustls.rs) has the same mapping.
Activity
fix(socket): retry interrupted plain TCP reads and writes (#1802)
fix(rustls): retry an interrupted handshake read or write (#1803)