fix bug on reading socket when ssl is disable

This commit is contained in:
DanyLE 2022-08-23 01:16:25 +02:00
parent 7315ece4dc
commit 923c6b2625

View File

@ -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)