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

Persistent delete notification #508

Closed Mecharyry closed 5 years ago

Mecharyry commented 5 years ago

Problem

It seems that when deleting we are immediately removing the batch from the internal map. Which has the unfortunate consequence of nearly always making this code here null 😂 I say nearly always because it's kind of a race between the executor and the update of the map to see who will remove or send a notification first 😄

Solution

Avoid removing from the internal map until we have sent the notification.