Skip to content

Commit

Permalink
Catch ClosedResourceError. Fixes #134
Browse files Browse the repository at this point in the history
  • Loading branch information
nmichaud committed Sep 21, 2020
1 parent b798551 commit 2c015b1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion trio_websocket/_impl.py
Expand Up @@ -1069,7 +1069,7 @@ async def _handle_message_event(self, event):
self._message_parts = []
try:
await self._send_channel.send(msg)
except trio.BrokenResourceError:
except (trio.ClosedResourceError, trio.BrokenResourceError):
# The receive channel is closed, probably because somebody
# called ``aclose()``. We don't want to abort the reader task,
# and there's no useful cleanup that we can do here.
Expand Down

0 comments on commit 2c015b1

Please sign in to comment.