Browse Source
master5604857quit scripts gracefully on walletservice rpc startup failure (Adam Gibson)5af2d49handle Qt wallet load failure (Adam Gibson)202f8eeAdd clarifying comments for delayed order creation. (Adam Gibson)a2aafd2Fixes #673. Shutdown cleanly on failure to access blockheight (Adam Gibson)
11 changed files with 84 additions and 14 deletions
@ -0,0 +1,16 @@ |
|||||||
|
|
||||||
|
from twisted.internet.error import ReactorNotRunning, AlreadyCancelled |
||||||
|
from twisted.internet import reactor |
||||||
|
|
||||||
|
def stop_reactor(): |
||||||
|
""" The value of the bool `reactor.running` |
||||||
|
does not reliably tell us whether the |
||||||
|
reactor is running (!). There are startup |
||||||
|
and shutdown phases not reported externally |
||||||
|
by IReactorCore. So we must catch Exceptions |
||||||
|
raised by trying to stop the reactor. |
||||||
|
""" |
||||||
|
try: |
||||||
|
reactor.stop() |
||||||
|
except ReactorNotRunning: |
||||||
|
pass |
||||||
Loading…
Reference in new issue