mirror of
https://github.com/lxsang/ant-http
synced 2024-11-18 01:08:21 +01:00
fix bug on reading socket when ssl is disable
This commit is contained in:
parent
7315ece4dc
commit
923c6b2625
@ -766,8 +766,7 @@ int antd_recv(void *src, void *data, int len)
|
|||||||
time(&source->last_io);
|
time(&source->last_io);
|
||||||
//LOG("Read len is %d\n", readlen);
|
//LOG("Read len is %d\n", readlen);
|
||||||
}
|
}
|
||||||
else if ((read == 0) ||
|
else if (difftime(time(NULL), source->last_io) > MAX_IO_WAIT_TIME || (errno != EAGAIN && errno != EWOULDBLOCK))
|
||||||
difftime(time(NULL), source->last_io) > MAX_IO_WAIT_TIME || (errno != EAGAIN && errno != EWOULDBLOCK))
|
|
||||||
{
|
{
|
||||||
//ERROR("Error while reading: %s", strerror(errno));
|
//ERROR("Error while reading: %s", strerror(errno));
|
||||||
if (read == 0)
|
if (read == 0)
|
||||||
|
Loading…
Reference in New Issue
Block a user