From 923c6b2625cb00563ec62a401d0532d19451bcb1 Mon Sep 17 00:00:00 2001 From: DanyLE Date: Tue, 23 Aug 2022 01:16:25 +0200 Subject: [PATCH] fix bug on reading socket when ssl is disable --- lib/handle.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/handle.c b/lib/handle.c index 2353978..bbdce36 100644 --- a/lib/handle.c +++ b/lib/handle.c @@ -766,8 +766,7 @@ int antd_recv(void *src, void *data, int len) time(&source->last_io); //LOG("Read len is %d\n", readlen); } - else if ((read == 0) || - difftime(time(NULL), source->last_io) > MAX_IO_WAIT_TIME || (errno != EAGAIN && errno != EWOULDBLOCK)) + else if (difftime(time(NULL), source->last_io) > MAX_IO_WAIT_TIME || (errno != EAGAIN && errno != EWOULDBLOCK)) { //ERROR("Error while reading: %s", strerror(errno)); if (read == 0)