mirror of
https://github.com/3proxy/3proxy.git
synced 2026-11-22 15:59:41 +08:00
Use MAXFAILATTEMPT to limit socket failuers
This commit is contained in:
1 parent
aeb0f4caa5
commit
3f2659cb0f
1 file changed
+3
-1
+3
-1
@@ -8,6 +8,8 @@
|
||||
|
||||
#include "proxy.h"
|
||||
|
||||
#define MAXFAILATTEMPT 10
|
||||
|
||||
#ifdef WITHLOG
|
||||
#if WITHLOG > 1
|
||||
char logbuf[1024];
|
||||
@@ -157,7 +159,7 @@ log(logbuf);
|
||||
#endif
|
||||
|
||||
if(needaction > 2 && !sleeptime){
|
||||
if(needaction > 13){RETURN (93);}
|
||||
if(needaction > (MAXFAILATTEMPT+1)){RETURN (93);}
|
||||
sleeptime = (1<<(needaction-2));
|
||||
}
|
||||
if(sleeptime > 0) {
|
||||
|
||||
Reference in new issue
Block a user