HomePhabricator

[chronik-client] Fix WebSocket retry loop issues during disconnection

Description

[chronik-client] Fix WebSocket retry loop issues during disconnection

Summary:
Removed the previous delay handling. Only ensure in this diff that faulty urls can be switched correctly. The improvements to the WsEndpoint object mentioned in the diff will be handled in future diffs.

before modification: When a WebSocket connection to a URL is terminated due to a fault, triggering the onclose event callback function, the system automatically attempts to reconnect to this closed url for failover, which may not be successful and poses a risk of recursion.

After modification: When a WebSocket connection to a URL is terminated due to a fault, triggering the onclose event callback function, the system automatically attempts to connect to the next available url for failover.

Test Plan: npm test

Reviewers: Fabien, bytesofman, emack, O1 Bitcoin ABC, #bitcoin_abc

Reviewed By: Fabien, bytesofman, O1 Bitcoin ABC, #bitcoin_abc

Differential Revision: https://reviews.bitcoinabc.org/D17974

Details

Provenance
alitayinAuthored on Wed, Apr 23, 06:36
alitayinPushed on Mon, Apr 28, 14:00
Reviewer
Restricted Owners Package
Differential Revision
D17974: [chronik-client] Fix WebSocket retry loop issues during disconnection
Parents
rABC50d4687d0808: [Automated] Update chainparams
Branches
Unknown
Tags
Unknown