Add timeout for connect in all modules

This commit is contained in:
z3APA3A committed 2016-12-23 00:56:16 +03:00
1 parent 3c9ff54ae8
commit e2884b182a
6 files changed
+28 -19

No files matched your search

+1 -1
View File
@@ -553,7 +553,7 @@ int MODULEMAINFUNC (int argc, char** argv){
new_sock=so._socket(SASOCK(&defparam.sincr), SOCK_STREAM, IPPROTO_TCP);
if(new_sock != INVALID_SOCKET){
parsehost(srv.family, cbc_string, (struct sockaddr *)&defparam.sincr);
if(so._connect(new_sock,(struct sockaddr *)&defparam.sincr,SASIZE(&defparam.sincr))) {
if(connectwithpoll(new_sock,(struct sockaddr *)&defparam.sincr,SASIZE(&defparam.sincr))) {
so._closesocket(new_sock);
new_sock = INVALID_SOCKET;
usleep(SLEEPTIME);