Replies: 1 comment
-
I'm not sure I follow you entirely, but I guess you should be able to wrap your main loop wyth a |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello again. I'm currently stuck here: if the remote end suddenly terminates their end of the connection, how do I cleanly restart it?
My current flow is as follows, for context:
asyncio
loop is established that puts all incoming WS messages into a dictionary.The remote end is a server we control, but currently it's going through a rewrite so understandably it tends to crash while all kinks are being ironed out. The WS server gets spin up within moments for the most part after termination, so ideally we should wait until it's ready, reinstate the connection and try again. But the most important part is that the calling coroutine can't be asked to retry again later, it must get the result on its first and only invocation, although it can wait a reasonable amount of time for it.
Any thoughts? Thanks in advance.
Beta Was this translation helpful? Give feedback.
All reactions