diff options
author | Ilya Mashchenko <ilya@netdata.cloud> | 2023-11-15 17:33:38 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-11-15 15:33:38 +0000 |
commit | 89033b09aa448bb207f5b329f0c66d5365a22ed8 (patch) | |
tree | 557a0865e10d0b226edf4996a88c869d5c07589a | |
parent | b39300a5cbd21d9bac00bfac6e6aac5654a7ccd6 (diff) |
disable socket port reuse (#16420)
disable port reuse
-rw-r--r-- | libnetdata/socket/socket.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libnetdata/socket/socket.c b/libnetdata/socket/socket.c index 67dc4c71c0..24f9bea85d 100644 --- a/libnetdata/socket/socket.c +++ b/libnetdata/socket/socket.c @@ -303,7 +303,7 @@ int create_listen_socket4(int socktype, const char *ip, uint16_t port, int liste } sock_setreuse(sock, 1); - sock_setreuse_port(sock, 1); + sock_setreuse_port(sock, 0); sock_setnonblock(sock); sock_enlarge_in(sock); @@ -348,7 +348,7 @@ int create_listen_socket6(int socktype, uint32_t scope_id, const char *ip, int p } sock_setreuse(sock, 1); - sock_setreuse_port(sock, 1); + sock_setreuse_port(sock, 0); sock_setnonblock(sock); sock_enlarge_in(sock); |