Closed
Description
Hey there, first of all many thanks for providing this great library!
I'm running version 0.9.2 but I think it might be still relevant.
Websocket server had some ongoing maintenance and was dropping connections from time to time. Looks like this lead to the issue seen below. Should this wsproto error maybe be mapped to ConnectionClosed?
File "/pex-app/lib/python3.10/site-packages/trio_websocket/_impl.py", line 937, in send_message
await self._send(event)
File "/pex-app/lib/python3.10/site-packages/trio_websocket/_impl.py", line 1249, in _send
data = self._wsproto.send(event)
File "/pex-app/lib/python3.10/site-packages/wsproto/__init__.py", line 64, in send
data += self.connection.send(event)
File "/pex-app/lib/python3.10/site-packages/wsproto/connection.py", line 107, in send
raise LocalProtocolError(
wsproto.utilities.LocalProtocolError: Event TextMessage(data='...', frame_finished=True, message_finished=True) cannot be sent in state ConnectionState.REMOTE_CLOSING.