diff options
| author | Garrett D'Amore <garrett@damore.org> | 2025-09-14 17:20:14 -0700 |
|---|---|---|
| committer | Garrett D'Amore <garrett@damore.org> | 2025-09-14 17:20:14 -0700 |
| commit | d32abc2d5944637372f6ba597575ed17b14b974e (patch) | |
| tree | a76a0f2e5389258edb32f3b48ef77aaa25102f41 /src | |
| parent | a096df1fc30cc44ab01aa10bd1f72b33fd477b10 (diff) | |
| download | nng-d32abc2d5944637372f6ba597575ed17b14b974e.tar.gz nng-d32abc2d5944637372f6ba597575ed17b14b974e.tar.bz2 nng-d32abc2d5944637372f6ba597575ed17b14b974e.zip | |
Only log aborted connections at debug.
This is occurs normally on socket close and the error messages were alarming.
Diffstat (limited to 'src')
| -rw-r--r-- | src/core/listener.c | 13 |
1 files changed, 9 insertions, 4 deletions
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)); |
