hi all, i am having issue closing a client . i kee...
# ktor
b
hi all, i am having issue closing a client . i keep receiving messages event though i called
client.close()
Copy code
client.wss() {
    incoming.consumeAsFlow().onCompletion{
          // never stops receiving even after closing connection with `client.close()`
    }
}
a
Does it work if you close a WebSocket session instead of a client?
b
How can i properly close the websocket session?
a
In the scope of
client.wss() {
variable
this
references the current WebSocket session. You can call the
close
method to close a session.