Verified Commit 97410cc2 authored by Clayton Craft's avatar Clayton Craft
Browse files

main: handle cases where the conn might be broken when sending (MR 3)

There seem to be cases where the connection might be closed before it is
caught by the handle_connection loop
parent 5cd8c403
......@@ -127,7 +127,13 @@ class GnssShare:
sentence = await self._active_driver.readline()
for conn in self._open_connections:
await conn.send_all(sentence)
await conn.send_all(sentence)
# Sometimes a disconnect isn't caught in time by the
# handle_connection loop
except trio.BrokenResourceError:"Unable to send to socket client, "
"maybe connection closed?")
if self._active_driver is not None:"No more clients connected, closing "
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment