Skip to content
This repository was archived by the owner on Jul 20, 2020. It is now read-only.

how to reconnect properly #154

@yufeng0528

Description

@yufeng0528
    while True:
        tpool.starmap(get_data_from_websocket, task_list)

        if wss.conn and wss.conn.connected.is_set():
            time.sleep(5)
        else:
            wss = wss.reset()
            time.sleep(10)

and when the connection is close
got unlimited print as below

INFO:btfxwss.client:reset(): Waiting for connection to be set up..
INFO:btfxwss.client:reset(): Waiting for connection to be set up..
INFO:btfxwss.client:reset(): Waiting for connection to be set up..
INFO:btfxwss.client:reset(): Waiting for connection to be set up..
INFO:btfxwss.client:reset(): Waiting for connection to be set up..
INFO:btfxwss.client:reset(): Waiting for connection to be set up..

what's wrong with my code,
or right way to reconnect?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions