version: 1.2.0
python 2.7.6
when I use this module run a few days, anything is ok.
but the program will stuck a time, and I can not use my timeout decorator to exit and restart it, I can only kill it and restart the program
lastest log:
2022-05-18 11:07:34.680 [PID:161728] CMServerList cm.py[line:491] ERROR WebAPI boostrap failed: HTTPSConnectionPool(host='api.steampowered.com', port=443): Max retries exceeded with url: /ISteamDirectory/GetCMList/v1/?format=json&cellid=0 (Caused by ProxyError('Cannot connect to proxy.', timeout('timed out',)))
my timeout decorator:
def set_timeout(num, callback=None):
def wrap(func):
def handle(signum, frame):
raise TimeOutException
def to_do(*args, **kwargs):
try:
signal.signal(signal.SIGALRM, handle)
signal.alarm(num)
r = func(*args, **kwargs)
signal.alarm(0)
return r
except TimeOutException as e:
if not callback:
raise TimeOutException
else:
callback()
return to_do
return wrap
I think it might be related to the inability of signal to handle socket.getaddrinfo
thanks for any help or suggestion
version: 1.2.0 python 2.7.6 when I use this module run a few days, anything is ok. but the program will stuck a time, and I can not use my timeout decorator to exit and restart it, I can only kill it and restart the program
I think it might be related to the inability of signal to handle socket.getaddrinfo thanks for any help or suggestion