Introduce reconnect / retry logic on the TypeScript client #398
Replies: 4 comments
-
An easy solution is to use: https://www.npmjs.com/package/reconnecting-websocket Let me know if you want me to put up a PR @KtorZ |
Beta Was this translation helpful? Give feedback.
-
That's a good point, although, Ogmios is under some quite heavy change at the moment (v6 is coming). I'll be splitting the typescript-client in a separate repository soon. Happy to consider PRs from that new repository :) |
Beta Was this translation helpful? Give feedback.
-
@KtorZ What's the ETA for the new release? If the migration is too heavy, then is it possible to fix this in the current release? The socket interface does not have a Happy to help with PRs. |
Beta Was this translation helpful? Give feedback.
-
I started looking into this. Note that it isn't as easy as plugging-in a 'reconnecting-websocket' for several reasons:
So, I've started rolling something relatively simple in the client but it's also taking longer than the time I had budgeted for it at the moment. So I'll park it aside and proceed with the release of 6.0.0 without it with the intention of bringing it in a following release once the TS client has been split apart in another repository. |
Beta Was this translation helpful? Give feedback.
-
What Git revision / release tag are you using?
be859d6cc4adae512da31358e4870098ff741e83
Do you use any client SDK? If yes, which one?
Typescript client SDK
Describe what the problem is?
The websocket connection can be lost at any time, and if that's the case, there is no reconnect logic.
What should be the expected behavior?
There should be an option in the
InteractionContext
to specify a reconnect strategy.If applicable, what are the logs from the server around the occurence of the problem?
Beta Was this translation helpful? Give feedback.
All reactions