frame received via a websocket connection?
Or is listening to exception the only way to do that (not ideal since I don't listen to frames I just emit them, maybe the
ClosedSendChannelException
works for that but it's not mentioned in the docs)
🦻 1
a
Aleksei Tirman [JB]
03/13/2023, 12:13 PM
You can either catch the
CancellationException
and
ClosedSendChannelException
in a WebSockets handler or use raw WebSockets to manually send and receive the close frames.
g
Giuliopime
03/13/2023, 12:15 PM
When do these exceptions get thrown precisely?
a
Aleksei Tirman [JB]
03/13/2023, 12:19 PM
The
CancellationException
is thrown when the channel for outgoing frames is cancelled after receiving a close frame.