Closed kelcon closed 4 years ago
@kelcon, sorry you have that issue. Sadly, iOS closes all TCP connections after a short period of time after the app has been sent to the background.
However, you can use a background service React Native library to keep your app running in the background with all sockets open. I created react-native-background-actions
, but there are a lot of similar libraries.
Thank you. I will check it. I have discovered other approach in the mean time - to listen for an app state change and respawn server after "active" state event.
Description
Server not responding after getting to background and back No error event triggered
Steps to reproduce
I have basic server configuration (simple http server). It works perfect while on foreground. If go background, it will stop responding after several seconds. It will not go back nor emit error or close event.
Options:
Current behavior
As described above.
Expected behavior
I assume that error should be triggered as a clou to restart listening.
Screenshots If applicable, add screenshots to help explain your problem.
Relevant information