Networking with URLSession · Conclusion |

This is a companion discussion topic for the original entry at

Hello @bdmoakley! I have a question regarding how do you get around an issue like this:
[iOS 12 Beta 11] NSPOSIXErrorDomain Code=53: Software caused connection abort.

Is it possible to observe is URLSession has outstanding data tasks (I want invalidate background task as soon as it’s empty)? operationQueue.operationCount property is not reliable, as well as for delegate queue. Store all the data tasks for session and remove them seem to be a solution but I think not the perfect one.

@bdmoakley Can you please help with this when you get a chance? Thank you - much appreciated! :]