DeviceMgr: clean-up locks a bit
This commit is contained in:
@@ -547,8 +547,7 @@ class ColdcardPlugin(HW_PluginBase):
|
||||
# Acquire a connection to the hardware device (via USB)
|
||||
devmgr = self.device_manager()
|
||||
handler = keystore.handler
|
||||
with devmgr.hid_lock:
|
||||
client = devmgr.client_for_keystore(self, handler, keystore, force_pair)
|
||||
client = devmgr.client_for_keystore(self, handler, keystore, force_pair)
|
||||
|
||||
if client is not None:
|
||||
client.ping_check()
|
||||
|
||||
@@ -754,8 +754,7 @@ class DigitalBitboxPlugin(HW_PluginBase):
|
||||
def get_client(self, keystore, force_pair=True):
|
||||
devmgr = self.device_manager()
|
||||
handler = keystore.handler
|
||||
with devmgr.hid_lock:
|
||||
client = devmgr.client_for_keystore(self, handler, keystore, force_pair)
|
||||
client = devmgr.client_for_keystore(self, handler, keystore, force_pair)
|
||||
if client is not None:
|
||||
client.check_device_dialog()
|
||||
return client
|
||||
|
||||
@@ -182,8 +182,7 @@ class KeepKeyPlugin(HW_PluginBase):
|
||||
def get_client(self, keystore, force_pair=True) -> Optional['KeepKeyClient']:
|
||||
devmgr = self.device_manager()
|
||||
handler = keystore.handler
|
||||
with devmgr.hid_lock:
|
||||
client = devmgr.client_for_keystore(self, handler, keystore, force_pair)
|
||||
client = devmgr.client_for_keystore(self, handler, keystore, force_pair)
|
||||
# returns the client for a given keystore. can use xpub
|
||||
if client:
|
||||
client.used()
|
||||
|
||||
@@ -612,8 +612,7 @@ class LedgerPlugin(HW_PluginBase):
|
||||
# All client interaction should not be in the main GUI thread
|
||||
devmgr = self.device_manager()
|
||||
handler = keystore.handler
|
||||
with devmgr.hid_lock:
|
||||
client = devmgr.client_for_keystore(self, handler, keystore, force_pair)
|
||||
client = devmgr.client_for_keystore(self, handler, keystore, force_pair)
|
||||
# returns the client for a given keystore. can use xpub
|
||||
#if client:
|
||||
# client.used()
|
||||
|
||||
@@ -144,8 +144,7 @@ class SafeTPlugin(HW_PluginBase):
|
||||
def get_client(self, keystore, force_pair=True) -> Optional['SafeTClient']:
|
||||
devmgr = self.device_manager()
|
||||
handler = keystore.handler
|
||||
with devmgr.hid_lock:
|
||||
client = devmgr.client_for_keystore(self, handler, keystore, force_pair)
|
||||
client = devmgr.client_for_keystore(self, handler, keystore, force_pair)
|
||||
# returns the client for a given keystore. can use xpub
|
||||
if client:
|
||||
client.used()
|
||||
|
||||
@@ -176,8 +176,7 @@ class TrezorPlugin(HW_PluginBase):
|
||||
def get_client(self, keystore, force_pair=True) -> Optional['TrezorClientBase']:
|
||||
devmgr = self.device_manager()
|
||||
handler = keystore.handler
|
||||
with devmgr.hid_lock:
|
||||
client = devmgr.client_for_keystore(self, handler, keystore, force_pair)
|
||||
client = devmgr.client_for_keystore(self, handler, keystore, force_pair)
|
||||
# returns the client for a given keystore. can use xpub
|
||||
if client:
|
||||
client.used()
|
||||
|
||||
Reference in New Issue
Block a user