js-waku icon indicating copy to clipboard operation
js-waku copied to clipboard

chore: improve StreamManager

Open danisharora099 opened this issue 3 months ago • 3 comments

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;

danisharora099 avatar Apr 30 '24 12:04 danisharora099