mirror of
https://github.com/lxsang/ant-http
synced 2024-12-26 00:38:21 +01:00
remove read wait
This commit is contained in:
parent
58443ae2e9
commit
b8ad3ba9a1
@ -183,7 +183,7 @@ void *accept_request(void *data)
|
|||||||
// retry it later
|
// retry it later
|
||||||
if(client->attempt > MAX_ATTEMPT)
|
if(client->attempt > MAX_ATTEMPT)
|
||||||
{
|
{
|
||||||
LOG("Too much attempt, give up on %d\n", client->sock);
|
LOG("Too much attempt for read and write, give up on %d\n", client->sock);
|
||||||
server_config.connection++;
|
server_config.connection++;
|
||||||
unknow(rq->client);
|
unknow(rq->client);
|
||||||
return task;
|
return task;
|
||||||
@ -206,7 +206,7 @@ void *accept_request(void *data)
|
|||||||
case SSL_ERROR_WANT_READ:
|
case SSL_ERROR_WANT_READ:
|
||||||
case SSL_ERROR_WANT_WRITE:
|
case SSL_ERROR_WANT_WRITE:
|
||||||
case SSL_ERROR_NONE:
|
case SSL_ERROR_NONE:
|
||||||
//LOG("RECALL %d\n", stat);
|
//LOG("RETRY SSL %d\n", client->sock);
|
||||||
task->handle = accept_request;
|
task->handle = accept_request;
|
||||||
task->priority = HIGH_PRIORITY;
|
task->priority = HIGH_PRIORITY;
|
||||||
//task->type = LIGHT;
|
//task->type = LIGHT;
|
||||||
@ -219,20 +219,28 @@ void *accept_request(void *data)
|
|||||||
return task;
|
return task;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
client->attempt = 0;
|
|
||||||
client->status = 1;
|
client->status = 1;
|
||||||
task->handle = accept_request;
|
task->handle = accept_request;
|
||||||
return task;
|
return task;
|
||||||
}
|
}
|
||||||
else
|
/*else
|
||||||
{
|
{
|
||||||
if (!FD_ISSET(client->sock, &read_flags))
|
if (!FD_ISSET(client->sock, &read_flags))
|
||||||
{
|
{
|
||||||
|
if(client->attempt > MAX_ATTEMPT)
|
||||||
|
{
|
||||||
|
LOG("Too much attempt for read, give up on %d\n", client->sock);
|
||||||
|
server_config.connection++;
|
||||||
|
unknow(rq->client);
|
||||||
|
return task;
|
||||||
|
}
|
||||||
|
client->attempt++;
|
||||||
task->handle = accept_request;
|
task->handle = accept_request;
|
||||||
return task;
|
return task;
|
||||||
}
|
}
|
||||||
}
|
}*/
|
||||||
#endif
|
#endif
|
||||||
|
client->attempt = 0;
|
||||||
server_config.connection++;
|
server_config.connection++;
|
||||||
read_buf(rq->client, buf, sizeof(buf));
|
read_buf(rq->client, buf, sizeof(buf));
|
||||||
line = buf;
|
line = buf;
|
||||||
|
Loading…
Reference in New Issue
Block a user