summaryrefslogtreecommitdiff
path: root/listen.c
diff options
context:
space:
mode:
Diffstat (limited to 'listen.c')
-rw-r--r--listen.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/listen.c b/listen.c
index b4d51e1..7e59d1d 100644
--- a/listen.c
+++ b/listen.c
@@ -167,7 +167,7 @@ int uh_socket_bind(const char *host, const char *port, bool tls)
continue;
error:
- if (sock > 0)
+ if (sock > -1)
close(sock);
}