You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, I am cancelling a request but after .cancel() callback is called without errors and with a valid response. I call the cancel on the viewDidDisappear method because users can leave the screen while continue loading.
The text was updated successfully, but these errors were encountered:
This can certainly happen. The NSURLSession APIs are all asynchronous in nature. Calling cancel does not ensure the request is actually cancelled before it is able to complete.
But it should prevent calling the callback... Which is the workaround? I don't want to block the screen during the request. If users want to go back, they should be able to do that action.
Same problem with response.response = nil and cannot differentiate is this nil from cancel or timeout. Request did not finish and cancel still calls callback.
Hi, I am cancelling a request but after .cancel() callback is called without errors and with a valid response. I call the cancel on the viewDidDisappear method because users can leave the screen while continue loading.
The text was updated successfully, but these errors were encountered: