Hello dear people! I noticed that if we have an rp...
# kotlinx-rpc
j
Hello dear people! I noticed that if we have an rpc client and we lose connection (aka I restart the server 🙂 ), the connection is closed and then the KtorRPCClient only throws "Connection reset" errors from that moment on. I can work around this, by creating a new ktorRpcClient whenever the old one's
webSocketSession.isActive
returns false, but is this the wanted behavior? I was kind of expecting to make 1 KtorRpcClient and reuse that instance, and not having to bother with recreating it. Or am I holding it wrong?
👀 1
a
Hello! You are right both about the current behavior and expected one. For now, we don't have any reconnection mechanism, we'll make sure to add, but can't say for now when
j
@Alexander Sysoev thanks for the answer! I was also wondering: will the api to create a client be without suspending functions in the future? Now it is a bit annoying to not be able to inject the client :)
a
Good point We'll need to think about that, I'll make a ticket
❤️ 1