How would you know if a WebSocket session has been...
# ktor
v
How would you know if a WebSocket session has been closed without calling
incoming.receive()
and waiting for it to throw?
a
You can wrap the code in the WebSocket's handler with try/finally to get notified in the
finally
block when the session is closed.
v
what if my code is calling a
.collect()
on a flow?
e
Still works with try finally