fix typo and make sure objects exist before trying to stop them
This commit is contained in:
parent
5787802077
commit
936c1f2ada
2 changed files with 11 additions and 6 deletions
|
@ -138,11 +138,16 @@ class LBRYSession(object):
|
|||
ds = []
|
||||
if self.dht_node is not None:
|
||||
ds.append(defer.maybeDeferred(self.dht_node.stop))
|
||||
ds.append(defer.maybeDeferred(self.rate_limiter.stop))
|
||||
ds.append(defer.maybeDeferred(self.peer_finder.stop))
|
||||
ds.append(defer.maybeDeferred(self.hash_announcer.stop))
|
||||
ds.append(defer.maybeDeferred(self.wallet.stop))
|
||||
ds.append(defer.maybeDeferred(self.blob_manager.stop))
|
||||
if self.rate_limiter is not None:
|
||||
ds.append(defer.maybeDeferred(self.rate_limiter.stop))
|
||||
if self.peer_finder is not None:
|
||||
ds.append(defer.maybeDeferred(self.peer_finder.stop))
|
||||
if self.hash_announcer is not None:
|
||||
ds.append(defer.maybeDeferred(self.hash_announcer.stop))
|
||||
if self.wallet is not None:
|
||||
ds.append(defer.maybeDeferred(self.wallet.stop))
|
||||
if self.blob_manager is not None:
|
||||
ds.append(defer.maybeDeferred(self.blob_manager.stop))
|
||||
if self.upnp_redirects_set is True:
|
||||
ds.append(defer.maybeDeferred(self._unset_upnp))
|
||||
return defer.DeferredList(ds)
|
||||
|
|
|
@ -60,7 +60,7 @@ class LBRYConsole():
|
|||
if not self.lbrycrd_dir:
|
||||
self.lbrycrd_dir = os.path.join(os.path.expanduser("~"), ".lbrycrd")
|
||||
if not self.lbrycrd_conf:
|
||||
self.wallet_conf = os.path.join(self.lbrycrd_dir, "lbrycrd.conf")
|
||||
self.lbrycrd_conf = os.path.join(self.lbrycrd_dir, "lbrycrd.conf")
|
||||
self.lbrycrdd_path = lbrycrdd_path
|
||||
self.default_lbrycrdd_path = "./lbrycrdd"
|
||||
self.start_lbrycrdd = start_lbrycrdd
|
||||
|
|
Loading…
Add table
Reference in a new issue