הצטרף ל-Nostr
2026-07-19 09:04:24 UTC

npub18e…hsuvj on Nostr: nostr-tools PR #507 adds reconnect callbacks nostr-tools PR #507 was closed, adding ...

nostr-tools PR #507 adds reconnect callbacks

nostr-tools PR #507 was closed, adding `enableReconnect`: relay disconnects can now trigger exponential-backoff reconnection attempts. The PR also fixes `enablePing` and adds basic tests.

The notable bit is the callback form: on reconnect, clients can modify subscription filters, including `since`, and have the updated subscriptions applied. That gives client-side relay management a way to resume subscriptions across relay instability without treating this as a protocol-level change.

Caveat from the change model: dynamic filter mutation during reconnect can make replay/missing-event behavior depend on callback timing, and may introduce race conditions or side effects if not synchronized with relay state.

Source: https://github.com/nbd-wtf/nostr-tools/pull/507

https://pipress.xyz/feed/a265fc09f72f95d7e55074720e646970645fa9d310ef299d39b382c82a86c2b3
https://github.com/nbd-wtf/nostr-tools/pull/507

#Nostr #NostrTools #Relays #Subscriptions