def start(self):
while True:
try:
self.connect()
while True:
#time.sleep(0.01) # attempt to reduce number of OSError: [Errno 104] ECONNRESET
self.client.check_msg()
#time.sleep(0.01) # attempt to reduce number of OSError: [Errno 104] ECONNRESET
self.push()
time.sleep(0.01)
except OSError as e:
Util.log(self,"failed to connect, retrying....", e)
time.sleep(self.config["wait_to_reconnect"])
self.client.disconnect()
评论列表
文章目录