Catch exception when removing a checking torrent
This commit is contained in:
parent
60a78c52e2
commit
b6fe5166a8
|
@ -738,9 +738,14 @@ class TorrentManager(component.Component):
|
|||
|
||||
def on_alert_state_changed(self, alert):
|
||||
log.debug("on_alert_state_changed")
|
||||
torrent_id = str(alert.handle.info_hash())
|
||||
self.torrents[torrent_id].update_state()
|
||||
component.get("EventManager").emit(TorrentStateChangedEvent(torrent_id, self.torrents[torrent_id].state))
|
||||
try:
|
||||
torrent_id = str(alert.handle.info_hash())
|
||||
except RuntimeError:
|
||||
return
|
||||
|
||||
if torrent_id in self.torrents:
|
||||
self.torrents[torrent_id].update_state()
|
||||
component.get("EventManager").emit(TorrentStateChangedEvent(torrent_id, self.torrents[torrent_id].state))
|
||||
|
||||
def on_alert_save_resume_data(self, alert):
|
||||
log.debug("on_alert_save_resume_data")
|
||||
|
|
Loading…
Reference in New Issue