In the websocket example (on <this page>) it state...
# ktor
b
In the websocket example (on this page) it states that:
In this sample, the infinite loop is only exited with an exception is risen: either a ClosedReceiveChannelException or another exception.
but when I do a test with postman and hit “disconnect” on the postman side, no exception is thrown in ktor: instead the
for (frame in incoming)
loop just exits. Is this also a possible “close” behavior?
d
You will need to send a closing message from the client. Then the server, when it receives that message, should actively close the session.
b
Ok, maybe postman isn’t doing that on its disconnect.