'Getting NSURLErrorNetworkConnectionLost: -1005 in my app when getting response data from db

I'm getting this error (not all the time but several times) while getting response -which may contain large amount of data- from database in my ios app. Here is the case

I opened the menu that i will parse data, while response data is being downloaded, i put my app to background and opened Facebook app and then i went back to my app and got this error. (I have SSL Pinning in my app.)

Does iOS stop secure connection and start another in the same time, or maintain current and start another?

Is there any advice that I should follow?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source