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
@@ -145,7 +145,7 @@ void * ftpprchild(struct clientparam* param) {
if(sscanf((char *)buf+5, "%lu,%lu,%lu,%lu,%hu,%hu", &b1, &b2, &b3, &b4, &b5, &b6)!=6) {RETURN(828);}
*SAPORT(&param->sincr) = htons((unsigned short)((b5<<8)^b6));
if(so._connect(clidatasock, (struct sockaddr *)&param->sincr, SASIZE(&param->sincr))) {
if(connectwithpoll(clidatasock, (struct sockaddr *)&param->sincr, SASIZE(&param->sincr))) {
so._closesocket(clidatasock);
clidatasock = INVALID_SOCKET;
RETURN(826);