diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2020-09-11 17:44:55 +0100 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2020-09-11 17:44:55 +0100 |
commit | 4241a6d65d2ffa7f18763129472a94666fb55d1c (patch) | |
tree | 7c48435128480603fb68c73eacd81941c4568b21 /src/libserver/worker_util.c | |
parent | a355874d09c6989945458d7e989718ca3c5774f3 (diff) | |
download | rspamd-4241a6d65d2ffa7f18763129472a94666fb55d1c.tar.gz rspamd-4241a6d65d2ffa7f18763129472a94666fb55d1c.zip |
[Minor] Fix the previous commit (sync main and children)
Diffstat (limited to 'src/libserver/worker_util.c')
-rw-r--r-- | src/libserver/worker_util.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/libserver/worker_util.c b/src/libserver/worker_util.c index 417cbc733..89ebc10cb 100644 --- a/src/libserver/worker_util.c +++ b/src/libserver/worker_util.c @@ -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; } |