WebSocket transport does not allow healing connections #98
Replies: 3 comments
-
|
Hmm, what are you imagining should happen to the session state on a reconnect? That is, what happens to stubs that were passed over the connection before the disconnect? Possibilities include:
|
Beta Was this translation helpful? Give feedback.
-
|
I can't even tell when the WebSocket connection breaks. If I could, then I'd be able to call I can listen to the WebSocket's I had to make my own transport for the server side (because of Bun), so it looks like I'll have to do that for the client too. Edit: Looks like onRpcBroken can be used for this. |
Beta Was this translation helpful? Give feedback.
-
|
Yes, you can use I could imagine having something more batteries-included, but it's not entirely clear what the behavior should be (see my previous comment). |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
In other words, the session does not allow the websocket to reopen after it closes - the session is immediately aborted.
A way to reproduce this is with using reconnecting-websocket or partysocket.
Is this intentional behaviour of the default websocket transport? If so, would a new
ReconnectingWebsockettransport be acceptable or should this be left to userland? I'm not sure what your thoughts are about adding new transports to core.Beta Was this translation helpful? Give feedback.
All reactions