mirror of
https://github.com/lxsang/ant-http
synced 2024-12-26 00:38:21 +01:00
fix r/w wo ssl
This commit is contained in:
parent
d01e5e13aa
commit
50b248c9e2
BIN
dist/antd-1.0.4b.tar.gz
vendored
BIN
dist/antd-1.0.4b.tar.gz
vendored
Binary file not shown.
@ -301,7 +301,7 @@ int antd_send(void *src, const void* data, int len)
|
|||||||
written += count;
|
written += count;
|
||||||
writelen = (len - written) > BUFFLEN?BUFFLEN:(len-written);
|
writelen = (len - written) > BUFFLEN?BUFFLEN:(len-written);
|
||||||
}
|
}
|
||||||
else if(count == -1 && errno != EAGAIN && errno != EWOULDBLOCK)
|
else if(errno != EAGAIN && errno != EWOULDBLOCK)
|
||||||
{
|
{
|
||||||
if(written == 0)
|
if(written == 0)
|
||||||
written = count;
|
written = count;
|
||||||
@ -457,9 +457,9 @@ int antd_recv(void *src, void* data, int len)
|
|||||||
readlen = (len - read) > BUFFLEN?BUFFLEN:(len-read);
|
readlen = (len - read) > BUFFLEN?BUFFLEN:(len-read);
|
||||||
//LOG("Read len is %d\n", readlen);
|
//LOG("Read len is %d\n", readlen);
|
||||||
}
|
}
|
||||||
else if(received == -1 && errno != EAGAIN && errno != EWOULDBLOCK)
|
else if(errno != EAGAIN && errno != EWOULDBLOCK)
|
||||||
{
|
{
|
||||||
ERROR("Error while reading: %s", strerror(errno));
|
//ERROR("Error while reading: %s", strerror(errno));
|
||||||
if(read ==0)
|
if(read ==0)
|
||||||
read = received;
|
read = received;
|
||||||
break;
|
break;
|
||||||
|
Loading…
Reference in New Issue
Block a user