Skip to content

Commit

Permalink
Fixed already called error on removing torrent
Browse files Browse the repository at this point in the history
  • Loading branch information
xoriole committed Oct 9, 2019
1 parent f2a2231 commit 26b60ab
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions Tribler/Core/Libtorrent/LibtorrentMgr.py
Original file line number Diff line number Diff line change
Expand Up @@ -411,8 +411,9 @@ def process_alert(self, alert, hops=0):
infohash = str(alert.info_hash)
if infohash in self.torrents:
deferred = self.torrents[infohash][0].deferred_removed
del self.torrents[infohash]
deferred.callback(None)
self.torrents.pop(infohash, None)
if deferred and not deferred.called:
deferred.callback(None)
self._logger.debug("Removed torrent %s", infohash)
else:
self._logger.debug("Removed alert for unknown torrent")
Expand Down

0 comments on commit 26b60ab

Please sign in to comment.