anycable / anycable-client

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

fix: Possible unhandled promise rejection #5

Closed tienle closed 3 years ago

tienle commented 3 years ago

We have encountered unhandled promise rejection warnings in ReactNative (0.63.4) whenever the anycable websocket is down. From our investigation, it's because the reconnectNow() promise was not handled the rejection case.

Warnings happened after every scheduleReconnect()

Screenshot_1631101904

With the proposing fix, it will print out the log instead of raising RN unhandled rejection warnings. image

palkan commented 3 years ago

Thanks!

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