Skip to content

bisonw: Initial connection error does not start retry loop #3180

@jholdstock

Description

@jholdstock

These messages are logged if the initial connection to the dex server fails:

[ERR] CORE[wss://dex.decred.org:7232/ws]: Initial connection failed, starting reconnect loop: dial tcp 45.77.164.152:7232: i/o timeout
[ERR] CORE: Trouble establishing connection to dex.decred.org:7232 (will retry). Error: connect failure: dial tcp 45.77.164.152:7232: i/o timeout

No retrying actually takes place however. I took a brief look at the code and it seems to be because the context passed into wsConn.keepAlive is canceled. The retry loop is started properly if the following line is removed (first added in #1474):

cancel() // no context leak

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