aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/src/tcp_server.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/tcp_server.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/tcp_server.c b/src/tcp_server.c
index fe55e4f..221b27e 100644
--- a/src/tcp_server.c
+++ b/src/tcp_server.c
@@ -72,13 +72,13 @@ static void *connection_thread(void *_ctx)
* handled in the main thread. */
ret = signal_block_sigterms();
if (ret < 0)
- goto free_ctx;
+ goto close;
ctx->conn_handler(ctx->fd, ctx->arg);
-free_ctx:
+close:
+ net_close(ctx->fd);
free(ctx);
-
return NULL;
}