anycable / anycable-client

AnyCable / Action Cable JavaScript client for web, Node.js & React Native
MIT License
96 stars 15 forks source link

Suppress unhandled promise rejection while reconnect attempts #4

Closed gydroperit closed 3 years ago

gydroperit commented 3 years ago

Suppress unhandled promise rejection while trying to reconnect. connect method in anycable-client/packages/core/cable/index.js is async, so it would be good idea to

  1. change connect method in anycable-client/packages/core/monitor/index.test.ts to async variant
  2. catch connect rejections in anycable-client/packages/core/monitor/index.js
palkan commented 3 years ago

Thanks!

Merged in https://github.com/anycable/anycable-client/commit/5a1931c80717594d6c09711eeb874690eb67811c