Replies: 2 comments 5 replies
-
Yes, I did not build the connect feature to enter the reconnect loop if the initial connection fails, that only happens as a result of the connection dropping. So right now there is no workaround other than retrying yourself. |
Beta Was this translation helpful? Give feedback.
-
Cool, as of now i just have it on a while loop using the sleep function provided. Im sure using the event handlers is a better aproach but this will do, thank you very much |
Beta Was this translation helpful? Give feedback.
-
I noticed that on the javascript version if we initialize our client first before our server, the client will simply wait for the server and connect. On the python version, if we initialize the client before the server it raises a "ConnectionError" exception. Seems like it only attempts to connect once.
try: self.eio.connect(url, headers=headers, transports=transports, engineio_path=socketio_path) except engineio.exceptions.ConnectionError as exc: self._trigger_event( 'connect_error', '/', exc.args[1] if len(exc.args) > 1 else exc.args[0]) raise exceptions.ConnectionError(exc.args[0]) from None
Is there already a feature where my client can wait for the server connection upon initial? I know the client reconnects after the server disconnected, but this only works if it was connected successfully on initial. I implemented my own version of handling this, but i was just wondering if there was something available already and i just missed it.
Beta Was this translation helpful? Give feedback.
All reactions