Skip to content

Websocket connection need to be reestablished on network failures #6

@ArtemKaba

Description

@ArtemKaba

Hi everyone,

we built webhook application using example https://github.com/TrueConf/python-trueconf-bot/blob/master/examples/webhook.py

After network error or server restart we got an error
Send failed or connection closed: WS is not attached

Steps to reproduce:

# run the application with logging level INFO
python main.py
# wait for app has started
# simulate network issue like this
ip ro add <TC server> via 127.0.0.1
# wait for message "Attempting WebSocket connection"
# then remove network trouble
ip ro del <TC server> via 127.0.0.1
# the application will never talk to TC server again

Possibly you should add the reconnection logic here

raise RuntimeError("WS is not attached")

Bot version 1.1.8

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request
    No fields configured for Feature.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions