forked from LBRYCommunity/lbry-sdk
fix CallLaterManager trying to remove pending calls multiple times
This commit is contained in:
parent
aee7a3aa38
commit
ae22468fec
1 changed files with 3 additions and 2 deletions
|
@ -38,6 +38,7 @@ class CallLaterManager(object):
|
|||
|
||||
if call_later.active():
|
||||
call_later.cancel()
|
||||
if call_later in cls._pendingCallLaters:
|
||||
cls._pendingCallLaters.remove(call_later)
|
||||
return reason
|
||||
return cancel
|
||||
|
@ -53,7 +54,7 @@ class CallLaterManager(object):
|
|||
canceller = cls._cancel(cls._pendingCallLaters[0])
|
||||
try:
|
||||
canceller()
|
||||
except (defer.CancelledError, defer.AlreadyCalledError):
|
||||
except (defer.CancelledError, defer.AlreadyCalledError, ValueError):
|
||||
pass
|
||||
|
||||
@classmethod
|
||||
|
|
Loading…
Reference in a new issue