Hello, I have a question about the Service Client....
# kotlinx-rpc
d
Hello, I have a question about the Service Client. I create and open it and can then communicate with the server. However, as soon as there's more than 60 seconds between two requests, the exception "Channel was cancelled" is thrown. I would have expected that when the connection is closed after 60 seconds and another request is made, the connection would be re-established. Is this a false assumption? Should a new client be created for each query (to avoid having to track the elapsed time between queries)? Or is it intended that when multiple queries occur with pauses in between, the timeout on the server must be set to infinite? (Client used with Kotlin/JS)
a
the connection would be re-established. Is this a false assumption?
This is one is false, yes, there is no reconnection available now For now, you can change webscokets timeout defaults or implement a ping pong request Alternatively, some I saw some people who implemented a StateFlow of clients
d
Oh okay, then I'll set the timeouts accordingly high. Thanks for the clarification. If I didn't overlook it in the documentation, that might be a worthwhile addition?
a
It is, but it may take a while (pun intended)
😂 1