dropbox / dropbox/dropbox-sdk-obj-c
Up/download stalls on iMac
- Dominant language
- Objective-C
- Stars
- 186
- Forks
- 118
- Avg merge
- 3m
- Merged PRs (30d)
- 9
Description
Hi,
I am using Dropbox embedded in an application and I have observer a very strange behaviour. On almost all of my devices, up/downloading files with `downloadURL:overwrite:destination` works well, but on one machine these up/downloads just stall from time to time. Not always, sometimes they work fine, at other attempts they just stall.
It works on all my iOS devices and on my Macbook Pros. But it stalls on my quadcore iMac.
I have traced the problem and added debug statements to the `NSURLSession` delegates and I see that in case where it stalls, the delegates are not called at all for theses download tasks. I see that the download tasks are created and they are resumes (`NSURLDownloadTask`), but after that the delegate is never called and the download never finishes. In the cache of the `NSURLSession` I see that the files are created (with zero 0), so I am sure that the `NSURLDownloadTask` is actually properly created.
This is not a network problem, because at the same time all my other devices in the same network all work fine.
When I force the `DBClientManager` to only use Foreground Sessions with the following initialisation then everything works without problems:
```
DBTransportDefaultConfig *transportConfig = [[DBTransportDefaultConfig alloc] initWithAppKey:DropboxAppKey forceForegroundSession:YES];
[DBClientsManager setupWithTransportConfigDesktop:transportConfig];
```
Any idea why this happens. I am only starting at most 10 simultaneous downloads at a time, so it cannot be a problem with thread explosion or anything.
This is all tested with 3.0.18
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.