diff options
-rw-r--r-- | client_network.c | 2 | ||||
-rw-r--r-- | main.c | 1 |
2 files changed, 2 insertions, 1 deletions
diff --git a/client_network.c b/client_network.c index 93ad1d9..1a7d60c 100644 --- a/client_network.c +++ b/client_network.c @@ -569,7 +569,7 @@ int initclientnetwork(void) { #if LOGALL ssize_t SENDCLIENT(struct string msg) { - if (msg.len == 0) + if (msg.len == 0 || client_fd == -1) return 0; static char printprefix = 1; @@ -233,6 +233,7 @@ void *client_loop(void *ign) { } close(client_fd); + client_fd = -1; free(full_msg.data); listen(client_listen_fd, 1); } |