increte wait time

This commit is contained in:
lxsang 2019-12-21 00:00:53 +01:00
parent f0ecc62162
commit d01e5e13aa
4 changed files with 3 additions and 4 deletions

Binary file not shown.

View File

@ -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)))
{ {

View File

@ -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)

View File

@ -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