fix indefinite reconnecting
This commit is contained in:
parent
ccd1aa70a2
commit
d376bf4052
@ -293,18 +293,11 @@ class ExternalMessageConsumer:
|
|||||||
logger.info(f"Connection to {channel} still alive, latency: {latency}ms")
|
logger.info(f"Connection to {channel} still alive, latency: {latency}ms")
|
||||||
continue
|
continue
|
||||||
|
|
||||||
except (websockets.exceptions.ConnectionClosed):
|
|
||||||
# Just eat the error and continue reconnecting
|
|
||||||
logger.warning(f"Disconnection in {channel} - retrying in {self.sleep_time}s")
|
|
||||||
await asyncio.sleep(self.sleep_time)
|
|
||||||
break
|
|
||||||
|
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
# Just eat the error and continue reconnecting
|
# Just eat the error and continue reconnecting
|
||||||
logger.warning(f"Ping error {channel} - {e} - retrying in {self.sleep_time}s")
|
logger.warning(f"Ping error {channel} - {e} - retrying in {self.sleep_time}s")
|
||||||
logger.debug(e, exc_info=e)
|
logger.debug(e, exc_info=e)
|
||||||
await asyncio.sleep(self.sleep_time)
|
raise
|
||||||
break
|
|
||||||
|
|
||||||
def send_producer_request(
|
def send_producer_request(
|
||||||
self,
|
self,
|
||||||
|
Loading…
Reference in New Issue
Block a user