From d32abc2d5944637372f6ba597575ed17b14b974e Mon Sep 17 00:00:00 2001 From: Garrett D'Amore Date: Sun, 14 Sep 2025 17:20:14 -0700 Subject: Only log aborted connections at debug. This is occurs normally on socket close and the error messages were alarming. --- src/core/listener.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/core/listener.c b/src/core/listener.c index cd10cb02..b8efd487 100644 --- a/src/core/listener.c +++ b/src/core/listener.c @@ -407,10 +407,15 @@ listener_accept_cb(void *arg) nni_pipe_start(nni_aio_get_output(aio, 0)); listener_accept_start(l); break; - case NNG_ECONNABORTED: // remote condition, no cool down - case NNG_ECONNRESET: // remote condition, no cool down - case NNG_ETIMEDOUT: // No need to sleep, we timed out already. - case NNG_EPEERAUTH: // peer validation failure + case NNG_ECONNABORTED: // happens on socket shutdown (normal) + nng_log_debug("NNG-ACCEPT-ABORT", + "Connection for socket<%u>: %s", nni_sock_id(l->l_sock), + nng_strerror(rv)); + nni_listener_bump_error(l, rv); + break; + case NNG_ECONNRESET: // remote condition, no cool down + case NNG_ETIMEDOUT: // No need to sleep, we timed out already. + case NNG_EPEERAUTH: // peer validation failure nng_log_warn("NNG-ACCEPT-FAIL", "Failed accepting for socket<%u>: %s", nni_sock_id(l->l_sock), nng_strerror(rv)); -- cgit v1.2.3-70-g09d2