Ver código fonte

[Minor] Fix the previous commit (sync main and children)

tags/2.6
Vsevolod Stakhov 3 anos atrás
pai
commit
4241a6d65d
2 arquivos alterados com 1 adições e 3 exclusões
  1. 1
    2
      src/libserver/worker_util.c
  2. 0
    1
      src/rspamd.h

+ 1
- 2
src/libserver/worker_util.c Ver arquivo

@@ -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;
}

+ 0
- 1
src/rspamd.h Ver arquivo

@@ -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 {

Carregando…
Cancelar
Salvar