novoda / download-manager

A library that handles long-running downloads, handling the network interactions and retrying downloads automatically after failures
Apache License 2.0
483 stars 63 forks source link

DLM-499/Network recovery not initialised #500

Closed tobiasheine closed 5 years ago

tobiasheine commented 5 years ago

Problem

As detailed in #499, we're observing exceptions where the DownloadsNetworkRecovery is accessed before being initialized.

Solution

Avoid possible race condition by first initializing the DownloadsNetworkRecovery and then the liteDownloadManager.

Manually verified through the included sample that this doesn't break the basic download workfows:

Paired with

@zegnus