Why is NWPathMonitor handler invoked when there is no change in path?

Viewed 59

I am using NWPathMonitor(https://developer.apple.com/documentation/network/nwpathmonitor) to detect any network changes in my background process. I have noticed recently that every time I open an app and close it the handler is invoked. I also notice that there is no change in the path from the previous value that is passed. I am comparing these fields: interfaceType, supportsIpV4, supportsIpV6 and isSatisfied.

I have seen it many times consistently that when I open an app and close it by swiping it away the handler is invoked. I have observed this behaviour with following apps: App Store, Safari, Whatsapp apps.

Does anyone know why this happens? The reason I am concerned is that the time my background process takes to process this handler could be adding to the network delays on the device.

0 Answers
Related