We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 31309d8 commit 60a9775Copy full SHA for 60a9775
asterisk/ami/client.py
@@ -313,6 +313,11 @@ def try_reconnect(self):
313
if response is not None and not response.is_error():
314
self.on_reconnect(self._ami_client, response)
315
return True
316
+ except (BrokenPipeError):
317
+ self._ami_client._socket.close()
318
+ self._ami_client._socket = None
319
+ self._ami_client.connect()
320
+ self.try_reconnect()
321
except:
322
pass
323
return False
0 commit comments