js-waku
js-waku copied to clipboard
chore: improve StreamManager
Problem
https://github.com/waku-org/js-waku/issues/1965
Solution
This PR:
- adds connection timeout, retry backoff base and maximum retries for stream creation
- sets up a
Promise.race()
between successful stream creation and timeout - adds error handling to
getStream
to log errors when stream creation fails - handles stream creation based on connection status
Notes
- Related to https://github.com/waku-org/js-waku/issues/1965#issuecomment-2066078674
Contribution checklist:
- [ ] covered by unit tests;
- [ ] covered by e2e test;
- [ ] add
!
in title if breaks public API;