fix(signalr): fix catch exception
This commit is contained in:
@@ -78,10 +78,11 @@ class Client:
|
|||||||
except WebSocketDisconnect:
|
except WebSocketDisconnect:
|
||||||
break
|
break
|
||||||
except RuntimeError as e:
|
except RuntimeError as e:
|
||||||
if "disconnect message" in str(e):
|
if "disconnect message" in str(e) or "close message" in str(e):
|
||||||
break
|
break
|
||||||
else:
|
else:
|
||||||
logger.error(f"Error in ping task for {self.connection_id}: {e}")
|
logger.error(f"Error in ping task for {self.connection_id}: {e}")
|
||||||
|
break
|
||||||
except Exception:
|
except Exception:
|
||||||
logger.exception(f"Error in client {self.connection_id}")
|
logger.exception(f"Error in client {self.connection_id}")
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user