diff --git a/http_server.c b/http_server.c index 52f1a33..b767d4c 100644 --- a/http_server.c +++ b/http_server.c @@ -223,22 +223,14 @@ void *accept_request(void *data) task->handle = accept_request; return task; } - /*else + else { 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; return task; } - }*/ + } #endif client->attempt = 0; server_config.connection++; diff --git a/libs/handle.c b/libs/handle.c index 8ec4ef5..6ff7603 100644 --- a/libs/handle.c +++ b/libs/handle.c @@ -163,7 +163,7 @@ int antd_send(void *src, const void* data, int len) break; } } - source->attempt = 0; + //source->attempt = 0; } else { @@ -271,7 +271,7 @@ int antd_recv(void *src, void* data, int len) break; } } - source->attempt = 0; + //source->attempt = 0; /* int stat, r, st; do{