mirror of
https://github.com/lxsang/ant-http
synced 2024-12-25 16:28:21 +01:00
increte wait time
This commit is contained in:
parent
f0ecc62162
commit
d01e5e13aa
BIN
dist/antd-1.0.4b.tar.gz
vendored
BIN
dist/antd-1.0.4b.tar.gz
vendored
Binary file not shown.
4
httpd.c
4
httpd.c
@ -208,7 +208,7 @@ int main(int argc, char* argv[])
|
|||||||
{
|
{
|
||||||
//ERROR("Reach max connection %d", conf->connection);
|
//ERROR("Reach max connection %d", conf->connection);
|
||||||
timeout.tv_sec = 0;
|
timeout.tv_sec = 0;
|
||||||
timeout.tv_usec = 5000; // 5 ms
|
timeout.tv_usec = 10000; // 5 ms
|
||||||
select(0, NULL, NULL, NULL, &timeout);
|
select(0, NULL, NULL, NULL, &timeout);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
@ -222,7 +222,7 @@ int main(int argc, char* argv[])
|
|||||||
FD_ZERO(&write_flags);
|
FD_ZERO(&write_flags);
|
||||||
FD_SET(pcnf->sock, &write_flags);
|
FD_SET(pcnf->sock, &write_flags);
|
||||||
timeout.tv_sec = 0;
|
timeout.tv_sec = 0;
|
||||||
timeout.tv_usec = 5000; // 5 ms
|
timeout.tv_usec = 10000; // 10 ms
|
||||||
int sel = select(pcnf->sock + 1, &read_flags, &write_flags, (fd_set *)0, &timeout);
|
int sel = select(pcnf->sock + 1, &read_flags, &write_flags, (fd_set *)0, &timeout);
|
||||||
if(sel > 0 && (FD_ISSET(pcnf->sock, &read_flags) || FD_ISSET(pcnf->sock, &write_flags)))
|
if(sel > 0 && (FD_ISSET(pcnf->sock, &read_flags) || FD_ISSET(pcnf->sock, &write_flags)))
|
||||||
{
|
{
|
||||||
|
@ -457,7 +457,7 @@ 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(errno != EAGAIN && errno != EWOULDBLOCK)
|
else if(received == -1 && errno != EAGAIN && errno != EWOULDBLOCK)
|
||||||
{
|
{
|
||||||
ERROR("Error while reading: %s", strerror(errno));
|
ERROR("Error while reading: %s", strerror(errno));
|
||||||
if(read ==0)
|
if(read ==0)
|
||||||
|
@ -44,7 +44,6 @@ typedef struct{
|
|||||||
int sock;
|
int sock;
|
||||||
void* ssl;
|
void* ssl;
|
||||||
char* ip;
|
char* ip;
|
||||||
int port;
|
|
||||||
//#ifdef USE_OPENSSL
|
//#ifdef USE_OPENSSL
|
||||||
int status;
|
int status;
|
||||||
//#endif
|
//#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user