diff options
| author | DanConwayDev <DanConwayDev@protonmail.com> | 2025-12-11 12:36:51 +0000 |
|---|---|---|
| committer | DanConwayDev <DanConwayDev@protonmail.com> | 2025-12-11 12:36:51 +0000 |
| commit | 83844a528365e657cd5f4d2cda51d72ced9900da (patch) | |
| tree | 023052e0c7709341aa30ee7d40a62a26e2368cea /src/http | |
| parent | b0ea9aa56c90fe36604e56707498261d761b9a56 (diff) | |
fix: wire up relay disconnection detection for metrics
- Add periodic health check in RelayConnection::run_event_loop that polls
nostr-sdk's relay.is_connected() every second to detect dead connections
- When event channel closes without explicit Closed/Shutdown, send
DisconnectNotification to SyncManager (fixes case where TCP drops silently)
- Enable test_relay_connected_status test which validates the
ngit_sync_relay_connected metric correctly reflects connection state
The issue was that when a remote relay stops abruptly, nostr-sdk's
notification receiver blocks indefinitely waiting for data. TCP disconnect
detection without keepalive can take minutes. The health check polls
nostr-sdk's internal relay status which detects disconnection promptly.
Diffstat (limited to 'src/http')
0 files changed, 0 insertions, 0 deletions