Writing to a socket the peer has already reset raises SIGPIPE, whose
default action kills the whole process. Socket.cpp carried a
sigpipe_handler but nothing ever installed it. OpenSSL's SSL_write()
calls write() itself, so MSG_NOSIGNAL can't cover TLS - ignore the
signal once for every server built on EPoll. Reproduced: a burst of
TLS clients disconnecting mid-session killed the server within a few
rounds.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0121tAhQVe4qbCwYgVjKQS4B
It was a stub that always returned "", so everything keyed on the
client address saw an empty string: SPF checks in BARANTMail were run
against no IP at all, Received: headers had no address, and
IPAddressList black/white lists could never match.
getClientAddressAndPort() also used inet_ntoa() (a static buffer shared
across threads) and printed the port in network byte order.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0121tAhQVe4qbCwYgVjKQS4B