Join Slack
Powered by
How would you know if a WebSocket session has been...
# ktor
v
Ville Orkas
01/19/2024, 12:31 PM
How would you know if a WebSocket session has been closed without calling
incoming.receive()
and waiting for it to throw?
a
Aleksei Tirman [JB]
01/19/2024, 3:57 PM
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
Ville Orkas
01/19/2024, 4:00 PM
what if my code is calling a
.collect()
on a flow?
e
efemoney
01/19/2024, 5:13 PM
Still works with try finally
3
Views
Open in Slack
Previous
Next