diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2023-10-17 09:30:20 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2023-10-17 09:30:20 +0000 |
commit | 386ccdd61e8256c8b21ee27ee2fc12438fc5ca98 (patch) | |
tree | c9fbcacdb01f029f46133a5ba7ecd610c2bcb041 /web/server/h2o | |
parent | Adding upstream version 1.42.4. (diff) | |
download | netdata-upstream/1.43.0.tar.xz netdata-upstream/1.43.0.zip |
Adding upstream version 1.43.0.upstream/1.43.0
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'web/server/h2o')
-rw-r--r-- | web/server/h2o/http_server.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/web/server/h2o/http_server.c b/web/server/h2o/http_server.c index b94a7daeb..650a36184 100644 --- a/web/server/h2o/http_server.c +++ b/web/server/h2o/http_server.c @@ -46,6 +46,8 @@ static int create_listener(const char *ip, int port) if ((fd = socket(AF_INET, SOCK_STREAM, 0)) == -1 || setsockopt(fd, SOL_SOCKET, SO_REUSEADDR, &reuseaddr_flag, sizeof(reuseaddr_flag)) != 0 || bind(fd, (struct sockaddr *)&addr, sizeof(addr)) != 0 || listen(fd, SOMAXCONN) != 0) { + if (fd != -1) + close(fd); return -1; } |