Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Vanilla-Client: Procedures never resolve when websockets are disconnected #226

Open
v-morlock opened this issue Sep 22, 2023 · 2 comments
Open

Comments

@v-morlock
Copy link

Hi,

i was playing around with the vanilla client and it seems like currently, requests will never resolve when they are performed against a websocket client and the client is disconnected...

export const client = createClient<Procedures>({
  transport: new WebsocketTransport("ws://localhost:4000/rspc/ws"),
});

await  await client.query(["..."]) // → won't resolve
@Brendonovich
Copy link
Collaborator

Brendonovich commented Oct 30, 2023

I think this is intentional, and it seems like tRPC does the same thing. Requests are queued until the websocket connects.

@v-morlock
Copy link
Author

If this is the case, i think there should at least be a way for the frontend to either introspect this or to define a timeout..

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants