mirror of
https://git.deluge-torrent.org/deluge
synced 2025-08-03 06:58:42 +00:00
Fix remove torrent lock-up issue.
This commit is contained in:
parent
fa2814b498
commit
9e5e6ddfb9
1 changed files with 17 additions and 8 deletions
25
src/core.py
25
src/core.py
|
@ -489,6 +489,14 @@ class Manager:
|
||||||
def handle_events(self):
|
def handle_events(self):
|
||||||
# Handle them for the backend's purposes, but still send them up in case the client
|
# Handle them for the backend's purposes, but still send them up in case the client
|
||||||
# wants to do something - show messages, for example
|
# wants to do something - show messages, for example
|
||||||
|
def pop_event():
|
||||||
|
try:
|
||||||
|
return deluge_core.pop_event()
|
||||||
|
except:
|
||||||
|
pass
|
||||||
|
else:
|
||||||
|
return deluge_core.pop_event()
|
||||||
|
|
||||||
ret = []
|
ret = []
|
||||||
try:
|
try:
|
||||||
event = deluge_core.pop_event()
|
event = deluge_core.pop_event()
|
||||||
|
@ -499,7 +507,14 @@ class Manager:
|
||||||
# print "EVENT: ", event
|
# print "EVENT: ", event
|
||||||
|
|
||||||
ret.append(event)
|
ret.append(event)
|
||||||
|
try:
|
||||||
|
if event['unique_ID'] not in self.unique_IDs:
|
||||||
|
event = pop_event()
|
||||||
|
continue
|
||||||
|
except KeyError:
|
||||||
|
event = pop_event()
|
||||||
|
continue
|
||||||
|
|
||||||
if event['event_type'] is self.constants['EVENT_FINISHED']:
|
if event['event_type'] is self.constants['EVENT_FINISHED']:
|
||||||
# Queue seeding torrent to bottom if needed
|
# Queue seeding torrent to bottom if needed
|
||||||
if self.get_pref('queue_seeds_to_bottom'):
|
if self.get_pref('queue_seeds_to_bottom'):
|
||||||
|
@ -531,13 +546,7 @@ class Manager:
|
||||||
"tracker_messages",
|
"tracker_messages",
|
||||||
new)
|
new)
|
||||||
|
|
||||||
|
event = pop_event()
|
||||||
try:
|
|
||||||
event = deluge_core.pop_event()
|
|
||||||
except:
|
|
||||||
pass
|
|
||||||
else:
|
|
||||||
event = deluge_core.pop_event()
|
|
||||||
|
|
||||||
return ret
|
return ret
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue