summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortiptorrent development team <tiptorrent@soleta.eu>2021-09-10 13:40:06 +0200
committertiptorrent development team <tiptorrent@soleta.eu>2021-09-29 15:48:05 +0200
commit9cf3edf10f79335b65ceb9599f10483557d48047 (patch)
treea9702a472445aa2a9ef931b220ecf0a816fb281c
parentb07785d2d1b1ed42ea5f863c006f6ee60eceabc2 (diff)
call shutdown() before close()
-rw-r--r--src/core.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/core.c b/src/core.c
index 95bb614..9823c7a 100644
--- a/src/core.c
+++ b/src/core.c
@@ -41,6 +41,7 @@ static void tip_client_release(struct ev_loop *loop, struct tip_client *cli)
list_del(&cli->list);
ev_io_stop(loop, &cli->io);
+ shutdown(cli->io.fd, SHUT_RDWR);
close(cli->io.fd);
if (cli->fd > 0)
close(cli->fd);