mirror of
https://github.com/lxsang/ant-http
synced 2024-12-26 16:58: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;
|
written = 0;
|
||||||
fd_set fds;
|
fd_set fds;
|
||||||
struct timeval timeout;
|
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);
|
count = SSL_write (source->ssl, ptr+written, writelen);
|
||||||
if (count > 0)
|
if (count > 0)
|
||||||
@ -102,7 +102,7 @@ int antd_send(void *src, const void* data, int len)
|
|||||||
{
|
{
|
||||||
// no real error, just try again...
|
// no real error, just try again...
|
||||||
//LOG("SSL_ERROR_NONE \n");
|
//LOG("SSL_ERROR_NONE \n");
|
||||||
source->attempt++;
|
//source->attempt++;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -127,7 +127,7 @@ int antd_send(void *src, const void* data, int len)
|
|||||||
err = select(sock+1, &fds, NULL, NULL, &timeout);
|
err = select(sock+1, &fds, NULL, NULL, &timeout);
|
||||||
if (err == 0 || (err > 0 && FD_ISSET(sock, &fds)))
|
if (err == 0 || (err > 0 && FD_ISSET(sock, &fds)))
|
||||||
{
|
{
|
||||||
source->attempt++;
|
//source->attempt++;
|
||||||
continue; // more data to read...
|
continue; // more data to read...
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@ -147,7 +147,7 @@ int antd_send(void *src, const void* data, int len)
|
|||||||
err = select(sock+1, NULL, &fds, NULL, &timeout);
|
err = select(sock+1, NULL, &fds, NULL, &timeout);
|
||||||
if (err == 0 || (err > 0 && FD_ISSET(sock, &fds)))
|
if (err == 0 || (err > 0 && FD_ISSET(sock, &fds)))
|
||||||
{
|
{
|
||||||
source->attempt++;
|
//source->attempt++;
|
||||||
continue; // can write more data now...
|
continue; // can write more data now...
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@ -192,7 +192,7 @@ int antd_recv(void *src, void* data, int len)
|
|||||||
read = 0;
|
read = 0;
|
||||||
fd_set fds;
|
fd_set fds;
|
||||||
struct timeval timeout;
|
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);
|
received = SSL_read (source->ssl, ptr+read, readlen);
|
||||||
if (received > 0)
|
if (received > 0)
|
||||||
@ -210,7 +210,7 @@ int antd_recv(void *src, void* data, int len)
|
|||||||
{
|
{
|
||||||
// no real error, just try again...
|
// no real error, just try again...
|
||||||
//LOG("SSL_ERROR_NONE \n");
|
//LOG("SSL_ERROR_NONE \n");
|
||||||
source->attempt++;
|
//source->attempt++;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -235,7 +235,7 @@ int antd_recv(void *src, void* data, int len)
|
|||||||
err = select(sock+1, &fds, NULL, NULL, &timeout);
|
err = select(sock+1, &fds, NULL, NULL, &timeout);
|
||||||
if (err == 0 || (err > 0 && FD_ISSET(sock, &fds)))
|
if (err == 0 || (err > 0 && FD_ISSET(sock, &fds)))
|
||||||
{
|
{
|
||||||
source->attempt++;
|
//source->attempt++;
|
||||||
continue; // more data to read...
|
continue; // more data to read...
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@ -255,7 +255,7 @@ int antd_recv(void *src, void* data, int len)
|
|||||||
err = select(sock+1, NULL, &fds, NULL, &timeout);
|
err = select(sock+1, NULL, &fds, NULL, &timeout);
|
||||||
if (err == 0 || (err > 0 && FD_ISSET(sock, &fds)))
|
if (err == 0 || (err > 0 && FD_ISSET(sock, &fds)))
|
||||||
{
|
{
|
||||||
source->attempt++;
|
//source->attempt++;
|
||||||
continue; // can write more data now...
|
continue; // can write more data now...
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
Loading…
Reference in New Issue
Block a user