mirror of
				https://github.com/cdryzun/tg_bot_collections.git
				synced 2025-11-04 16:56:43 +08:00 
			
		
		
		
	fix
This commit is contained in:
		
							
								
								
									
										10
									
								
								tg.py
									
									
									
									
									
								
							
							
						
						
									
										10
									
								
								tg.py
									
									
									
									
									
								
							@ -3,6 +3,16 @@ from telebot import TeleBot
 | 
			
		||||
 | 
			
		||||
from handlers import list_available_commands, load_handlers
 | 
			
		||||
 | 
			
		||||
import socket
 | 
			
		||||
from urllib3.connection import HTTPConnection
 | 
			
		||||
 | 
			
		||||
HTTPConnection.default_socket_options = HTTPConnection.default_socket_options + [
 | 
			
		||||
    (socket.SOL_SOCKET, socket.SO_KEEPALIVE, 1),
 | 
			
		||||
    (socket.SOL_TCP, socket.TCP_KEEPIDLE, 200),
 | 
			
		||||
    (socket.SOL_TCP, socket.TCP_KEEPINTVL, 45),
 | 
			
		||||
    (socket.SOL_TCP, socket.TCP_KEEPCNT, 20),
 | 
			
		||||
]
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def main():
 | 
			
		||||
    # Init args
 | 
			
		||||
 | 
			
		||||
		Reference in New Issue
	
	Block a user