mirror of
				https://github.com/3proxy/3proxy.git
				synced 2025-11-04 07:42:39 +08:00 
			
		
		
		
	Use MAXFAILATTEMPT to limit socket failuers
This commit is contained in:
		
							parent
							
								
									6092fd640f
								
							
						
					
					
						commit
						cb509c360f
					
				@ -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) {
 | 
			
		||||
 | 
			
		||||
		Loading…
	
		Reference in New Issue
	
	Block a user