fix deadlocks
This commit is contained in:
parent
e542b24bc6
commit
257c0915b5
|
@ -360,7 +360,6 @@ class DeviceMgr(ThreadJob, PrintError):
|
||||||
client.close()
|
client.close()
|
||||||
|
|
||||||
def unpair_id(self, id_):
|
def unpair_id(self, id_):
|
||||||
with self.lock:
|
|
||||||
xpub = self.xpub_by_id(id_)
|
xpub = self.xpub_by_id(id_)
|
||||||
if xpub:
|
if xpub:
|
||||||
self.unpair_xpub(xpub)
|
self.unpair_xpub(xpub)
|
||||||
|
@ -384,7 +383,7 @@ class DeviceMgr(ThreadJob, PrintError):
|
||||||
return self.client_lookup(id_)
|
return self.client_lookup(id_)
|
||||||
|
|
||||||
def client_for_keystore(self, plugin, handler, keystore, force_pair):
|
def client_for_keystore(self, plugin, handler, keystore, force_pair):
|
||||||
with self.lock:
|
self.print_error("getting client for keystore")
|
||||||
plugin.update_status(handler, False)
|
plugin.update_status(handler, False)
|
||||||
devices = self.scan_devices()
|
devices = self.scan_devices()
|
||||||
xpub = keystore.xpub
|
xpub = keystore.xpub
|
||||||
|
@ -395,6 +394,7 @@ class DeviceMgr(ThreadJob, PrintError):
|
||||||
client = self.force_pair_xpub(plugin, handler, info, xpub, derivation, devices)
|
client = self.force_pair_xpub(plugin, handler, info, xpub, derivation, devices)
|
||||||
if client:
|
if client:
|
||||||
plugin.update_status(handler, True)
|
plugin.update_status(handler, True)
|
||||||
|
self.print_error("end client for keystore")
|
||||||
return client
|
return client
|
||||||
|
|
||||||
def client_by_xpub(self, plugin, xpub, handler, devices):
|
def client_by_xpub(self, plugin, xpub, handler, devices):
|
||||||
|
|
Loading…
Reference in New Issue