Module: kamailio
Branch: master
Commit: 446c75e0e2194b6e42d768d2e3c79b5f0222905f
URL:
https://github.com/kamailio/kamailio/commit/446c75e0e2194b6e42d768d2e3c79b5…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2024-05-07T16:55:24+02:00
ctl: info log on ECONNRESET (connection reset by peer)
- not a type of error that can be controlled by kamailio
---
Modified: src/modules/ctl/io_listener.c
---
Diff:
https://github.com/kamailio/kamailio/commit/446c75e0e2194b6e42d768d2e3c79b5…
Patch:
https://github.com/kamailio/kamailio/commit/446c75e0e2194b6e42d768d2e3c79b5…
---
diff --git a/src/modules/ctl/io_listener.c b/src/modules/ctl/io_listener.c
index eb93f5f960d..4c15a6b1f21 100644
--- a/src/modules/ctl/io_listener.c
+++ b/src/modules/ctl/io_listener.c
@@ -486,7 +486,11 @@ static int handle_stream_read(struct stream_connection *s_c, int
idx)
} else if(errno == EINTR) {
goto again;
}
- LOG(L_ERR, "error reading: %s [%d]\n", strerror(errno), errno);
+ if(errno == ECONNRESET) {
+ LOG(L_INFO, "error reading: %s [%d]\n", strerror(errno), errno);
+ } else {
+ LOG(L_ERR, "error reading: %s [%d]\n", strerror(errno), errno);
+ }
goto error_read;
} else if(bytes_read == 0) { /* eof */
DBG("handle_stream read: eof on %s\n", s_c->parent->name);
@@ -602,7 +606,11 @@ static int handle_fifo_read(struct ctrl_socket *cs, int idx)
goto no_read; /* nothing has been read */
} else if(errno == EINTR)
goto again;
- LOG(L_ERR, "error reading: %s [%d]\n", strerror(errno), errno);
+ if(errno == ECONNRESET) {
+ LOG(L_INFO, "error reading: %s [%d]\n", strerror(errno), errno);
+ } else {
+ LOG(L_ERR, "error reading: %s [%d]\n", strerror(errno), errno);
+ }
goto error_read;
} else if(bytes_read == 0) { /* eof */
DBG("eof on %s\n", cs->name);