dropbox-sdk-obj-c
dropbox-sdk-obj-c copied to clipboard
[Issue #390] Fix “Completion handler can get overwritten for longpoll sessions"
We store data related to each URLSession in a “SessionData” object. To map from the session to the data, we either use the background id in the session config or assume that it is the foreground session.
However, there are actually 2 foreground sessions, one for longpoll routes. We used the same session data for both, which could result in bugs like completion handlers for tasks being overwritten.
Add a sessionDescription to disambiguate the sessions.