-
Notifications
You must be signed in to change notification settings - Fork 70
AutoReconnect goes into an endless loop #31
Copy link
Copy link
Open
Labels
Description
Hey. Faced a problem. When a session fails, it often does not work through reconnection. The try_reconnect method goes into an infinite loop and always throws a BrokenPipeError exception: [Errno 32] Broken pipe
client = AMIClient(address=config.ami_host, port=config.ami_port,timeout=2)
AutoReconnect(ami_client=client,delay=1)
future = client.login(username=config.ami_user,secret=config.ami_pass)
client.add_event_listener(
"""
add listeners
"""
)
if future.response.is_error():
raise Exception(str(future.response))
try:
while True:
time.sleep(5)
except (KeyboardInterrupt, SystemExit):
client.logoff()
Reactions are currently unavailable