HomePhabricator

[Chronik] Send regular pings from WebSocket to prevent disconnects

Description

[Chronik] Send regular pings from WebSocket to prevent disconnects

Summary:
This sends regular Ping messages from the websocket to keep the connection alive.

From empicial testing, it seems like 45s is a good number to keep the connection alive for both browser and NodeJS WebSocket connections.

We have to add a ChronikSettings to tune WS connection, because so far all configs were for the indexer only, but not for the HTTP/WS side of Chronik.

Test Plan: ./test/functional/test_runner.py chronik_ws_ping

Reviewers: Fabien, #bitcoin_abc

Reviewed By: Fabien, #bitcoin_abc

Subscribers: bytesofman

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

Details

Provenance
tobias_ruckAuthored on Jan 3 2024, 15:26
tobias_ruckPushed on Jan 5 2024, 10:00
Reviewer
Restricted Project
Differential Revision
D15069: [Chronik] Send regular pings from WebSocket to prevent disconnects
Parents
rABC2489c2c6d23c: [Cashtab] Add function to create targetOutput from opreturn as param input
Branches
Unknown
Tags
Unknown