From 1d190c6ea821d1b9400d3d85fa5f5d7529d50ca1 Mon Sep 17 00:00:00 2001 From: matt335672 <30179339+matt335672@users.noreply.github.com> Date: Fri, 1 Apr 2022 11:51:11 +0100 Subject: [PATCH] Prevent unnecessary close of sck = -1 in trans_listen_address() --- common/trans.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/trans.c b/common/trans.c index a02ec621..eb451073 100644 --- a/common/trans.c +++ b/common/trans.c @@ -863,7 +863,7 @@ trans_connect(struct trans *self, const char *server, const char *port, int trans_listen_address(struct trans *self, const char *port, const char *address) { - if (self->sck != 0) + if (self->sck >= 0) { g_tcp_close(self->sck); }