Skip to content
Discussion options

You must be logged in to vote

What I've seen people do is put the connect call in a for or while loop:

for retry in range(3):
    try:
        sio.connect(
            "https://DOMAIN/",
            socketio_path="/socket.io",
            headers={"x-auth-token": TOKEN},
        )
    except socketio.exceptions.ConnectionError:
	sleep(5)
    else:
        break

I'm not opposed to adding something like this as an option. Will definitely consider it when I look at #485, but that one is also lowish priority in my queue.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@TannerGabriel
Comment options

Answer selected by TannerGabriel
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants