pusher / pusher-websocket-react-native

React Native official Pusher SDK
MIT License
62 stars 55 forks source link

Pusher takes time to reconnect properly when coming back in foreground #91

Closed mudassar69 closed 1 year ago

mudassar69 commented 1 year ago

Steps to reproduce:

Expected behavior:

Pusher should automatically reconnect and resume subscribing to channels.

Actual behavior:

Upon returning to the app after being in the background for 30-40 minutes, the Pusher WebSocket library takes a significant amount of time (2-3 minutes) to reconnect. During this time, all queries sent from the app fail. Once reconnected, the queries work as expected. This issue is similar to one reported in the Pusher WebSocket Swift library (https://github.com/pusher/pusher-websocket-swift/issues/364).

benjamin-tang-pusher commented 1 year ago

Hi, our newer version of the Swift library 10.1.4 mitigates most of this, and is fetched by the 1.3.0 version of this RN library. Could you give it a try?

benw-pusher commented 1 year ago

This should be solved by the update mentioned above.