]> source.dussan.org Git - rspamd.git/commitdiff
[Minor] Fix the previous commit (sync main and children)
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Fri, 11 Sep 2020 16:44:55 +0000 (17:44 +0100)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Fri, 11 Sep 2020 16:44:55 +0000 (17:44 +0100)
src/libserver/worker_util.c
src/rspamd.h

index 417cbc7335c06151ba237e83ec34a722d8a2c447..89ebc10cbd0a8750581643998e83a444e16da338 100644 (file)
@@ -970,7 +970,6 @@ rspamd_maybe_reuseport_socket (struct rspamd_worker_listen_socket *ls)
                        if (ls->fd != -1) {
                                close (ls->fd);
                        }
-                       ls->reuseport = true;
                        ls->fd = nfd;
                        nfd = -1;
                }
@@ -1172,7 +1171,7 @@ rspamd_handle_main_fork (struct rspamd_worker *wrk,
                struct rspamd_worker_listen_socket *ls =
                                (struct rspamd_worker_listen_socket *)cur->data;
 
-               if (ls->reuseport) {
+               if (ls->fd != -1 && ls->type == RSPAMD_WORKER_SOCKET_UDP) {
                        close (ls->fd);
                        ls->fd = -1;
                }
index 470d13085e098e17493ceed6b3b4cf84b40b1034..2dfb512bce8b7c4f0a2ca8ff1501272eba355beb 100644 (file)
@@ -236,7 +236,6 @@ struct rspamd_worker_listen_socket {
        gint fd;
        enum rspamd_worker_socket_type type;
        bool is_systemd;
-       bool reuseport;
 };
 
 typedef struct worker_s {