mirror of
https://github.com/lxsang/ant-http
synced 2024-11-19 09:48:22 +01:00
use heavy task by default
This commit is contained in:
parent
133cb58e90
commit
58443ae2e9
@ -84,7 +84,7 @@ int antd_send(void *src, const void* data, int len)
|
||||
written = 0;
|
||||
fd_set fds;
|
||||
struct timeval timeout;
|
||||
while (writelen > 0 && source->attempt < MAX_ATTEMPT)
|
||||
while (writelen > 0) //source->attempt < MAX_ATTEMPT
|
||||
{
|
||||
count = SSL_write (source->ssl, ptr+written, writelen);
|
||||
if (count > 0)
|
||||
@ -102,7 +102,7 @@ int antd_send(void *src, const void* data, int len)
|
||||
{
|
||||
// no real error, just try again...
|
||||
//LOG("SSL_ERROR_NONE \n");
|
||||
source->attempt++;
|
||||
//source->attempt++;
|
||||
continue;
|
||||
}
|
||||
|
||||
@ -127,7 +127,7 @@ int antd_send(void *src, const void* data, int len)
|
||||
err = select(sock+1, &fds, NULL, NULL, &timeout);
|
||||
if (err == 0 || (err > 0 && FD_ISSET(sock, &fds)))
|
||||
{
|
||||
source->attempt++;
|
||||
//source->attempt++;
|
||||
continue; // more data to read...
|
||||
}
|
||||
break;
|
||||
@ -147,7 +147,7 @@ int antd_send(void *src, const void* data, int len)
|
||||
err = select(sock+1, NULL, &fds, NULL, &timeout);
|
||||
if (err == 0 || (err > 0 && FD_ISSET(sock, &fds)))
|
||||
{
|
||||
source->attempt++;
|
||||
//source->attempt++;
|
||||
continue; // can write more data now...
|
||||
}
|
||||
break;
|
||||
@ -192,7 +192,7 @@ int antd_recv(void *src, void* data, int len)
|
||||
read = 0;
|
||||
fd_set fds;
|
||||
struct timeval timeout;
|
||||
while (readlen > 0 && source->attempt < MAX_ATTEMPT)
|
||||
while (readlen > 0 )//&& source->attempt < MAX_ATTEMPT
|
||||
{
|
||||
received = SSL_read (source->ssl, ptr+read, readlen);
|
||||
if (received > 0)
|
||||
@ -210,7 +210,7 @@ int antd_recv(void *src, void* data, int len)
|
||||
{
|
||||
// no real error, just try again...
|
||||
//LOG("SSL_ERROR_NONE \n");
|
||||
source->attempt++;
|
||||
//source->attempt++;
|
||||
continue;
|
||||
}
|
||||
|
||||
@ -235,7 +235,7 @@ int antd_recv(void *src, void* data, int len)
|
||||
err = select(sock+1, &fds, NULL, NULL, &timeout);
|
||||
if (err == 0 || (err > 0 && FD_ISSET(sock, &fds)))
|
||||
{
|
||||
source->attempt++;
|
||||
//source->attempt++;
|
||||
continue; // more data to read...
|
||||
}
|
||||
break;
|
||||
@ -255,7 +255,7 @@ int antd_recv(void *src, void* data, int len)
|
||||
err = select(sock+1, NULL, &fds, NULL, &timeout);
|
||||
if (err == 0 || (err > 0 && FD_ISSET(sock, &fds)))
|
||||
{
|
||||
source->attempt++;
|
||||
//source->attempt++;
|
||||
continue; // can write more data now...
|
||||
}
|
||||
break;
|
||||
|
Loading…
Reference in New Issue
Block a user