Hello, I have a question about the service client:...
# kotlinx-rpc
d
Hello, I have a question about the service client: How should it be closed when I have a long-running query? Is it intended that I end the WebSocket session with cancel() or should I close the Ktor client with close()?
a
You can do this but better close RpcClient first and for termination
d
Just for confirmation: Since variants 1) and 2) are not available, you're referring to the Close method from HttpClient (Ktor), right?
a
oh, that's a bug You can do
(rpcClient as KrpcClient).close()
and also
awaitTermination
Will fix it in the next release
d
Thanks 👍