Module: kamailio
Branch: master
Commit: ada14c95d07cc8cb6fd468f73b2d3873b1ae45f3
URL: 
https://github.com/kamailio/kamailio/commit/ada14c95d07cc8cb6fd468f73b2d3873b1ae45f3

Author: Daniel-Constantin Mierla <mico...@gmail.com>
Committer: Daniel-Constantin Mierla <mico...@gmail.com>
Date: 2025-07-08T11:50:41+02:00

tls: skip connection close/clean log for main superviser process

---

Modified: src/modules/tls/tls_server.c

---

Diff:  
https://github.com/kamailio/kamailio/commit/ada14c95d07cc8cb6fd468f73b2d3873b1ae45f3.diff
Patch: 
https://github.com/kamailio/kamailio/commit/ada14c95d07cc8cb6fd468f73b2d3873b1ae45f3.patch

---

diff --git a/src/modules/tls/tls_server.c b/src/modules/tls/tls_server.c
index 5064d694b9b..8d323f7590e 100644
--- a/src/modules/tls/tls_server.c
+++ b/src/modules/tls/tls_server.c
@@ -685,8 +685,8 @@ void tls_h_tcpconn_clean_f(struct tcp_connection *c)
        /*
        * runs within global tcp lock
        */
-       if(!is_tcp_main()) {
-               LM_WARN("not in tcp main process\n");
+       if(!is_tcp_main() && !_ksr_is_main) {
+               LM_WARN("not in superviser or tcp main process\n");
        }
        if((c->type != PROTO_TLS) && (c->type != PROTO_WSS)) {
                BUG("Bad connection structure\n");
@@ -723,8 +723,8 @@ void tls_h_tcpconn_close_f(struct tcp_connection *c, int fd)
         * tcpconn_put_destroy()+tcpconn_close_main_fd() the connection might
         * still be in a writer, so in this case locking is needed.
         */
-       if(!is_tcp_main()) {
-               LM_WARN("not in tcp main process\n");
+       if(!is_tcp_main() && !_ksr_is_main) {
+               LM_WARN("not in superviser or tcp main process\n");
        }
        DBG("Closing SSL connection %p\n", c->extra_data);
        if(unlikely(cfg_get(tls, tls_cfg, send_close_notify) && c->extra_data)) 
{

_______________________________________________
Kamailio - Development Mailing List -- sr-dev@lists.kamailio.org
To unsubscribe send an email to sr-dev-le...@lists.kamailio.org
Important: keep the mailing list in the recipients, do not reply only to the 
sender!

Reply via email to