mirror of
https://github.com/3proxy/3proxy.git
synced 2025-02-23 18:45:40 +08:00
Prevent too fast connections on connect back
Prevent to fast connections on connect back proxy if port is not reachable
This commit is contained in:
parent
a9ec5a085c
commit
c538d0c2f8
@ -532,11 +532,13 @@ int MODULEMAINFUNC (int argc, char** argv){
|
|||||||
if(so._connect(new_sock,(struct sockaddr *)&defparam.sincr,sizeof(defparam.sincr))) {
|
if(so._connect(new_sock,(struct sockaddr *)&defparam.sincr,sizeof(defparam.sincr))) {
|
||||||
so._closesocket(new_sock);
|
so._closesocket(new_sock);
|
||||||
new_sock = INVALID_SOCKET;
|
new_sock = INVALID_SOCKET;
|
||||||
|
usleep(SLEEPTIME);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if(so._recvfrom(new_sock,buf,1,0,(struct sockaddr*)&defparam.sincr, &size) != 1) {
|
if(so._recvfrom(new_sock,buf,1,0,(struct sockaddr*)&defparam.sincr, &size) != 1) {
|
||||||
so._closesocket(new_sock);
|
so._closesocket(new_sock);
|
||||||
new_sock = INVALID_SOCKET;
|
new_sock = INVALID_SOCKET;
|
||||||
|
usleep(SLEEPTIME);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user