react-native-netinfo icon indicating copy to clipboard operation
react-native-netinfo copied to clipboard

fix: #719 Use global delegate fixing Android TooManyRequestsException

Open jcdhlzq opened this issue 1 year ago • 3 comments

Overview

The reason of this issue is system limits and counter.

image

And the cause of the issue may be that App may have created multiple RN instance and they all register network callbacks to system, mixed with that some native business also registering some callbacks, then resulted in the number of callbacks in the app goes up to the limits.

I've fixed this issue in our prt environment by registering only one network callbacks and sharing the callback from system to the other RN instances.

Test Plan

I have verified the effect and fixed the issue in our prt environment. This pr also works fine on this repository as shown by screenshots below:

fixed-image-online fixed-image-offline

jcdhlzq avatar Dec 22 '24 03:12 jcdhlzq