From 10ee4cff7e498a7c31a2cbfc1916f7d795c7aca2 Mon Sep 17 00:00:00 2001 From: Dirk Engling Date: Tue, 24 May 2022 22:43:15 +0200 Subject: Remove external status variable from connection code. Use return code to signal dead connection --- vchat-client.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'vchat-client.c') diff --git a/vchat-client.c b/vchat-client.c index c094376..d1afaa2 100755 --- a/vchat-client.c +++ b/vchat-client.c @@ -397,8 +397,8 @@ void eventloop(void) { userinput(); /* something to read from server? */ - if (poll_result & 2) - vc_receive(); + if ((poll_result & 2) && vc_receive()) + status = 0; break; } } -- cgit v1.2.3