Skip to content
This repository has been archived by the owner on Jun 27, 2022. It is now read-only.

Add a lock on a transport #87

Merged
merged 1 commit into from
Feb 26, 2018
Merged

Add a lock on a transport #87

merged 1 commit into from
Feb 26, 2018

Conversation

gre
Copy link
Contributor

@gre gre commented Feb 21, 2018

please review and test carefully.
this intend to fixes #83 , race condition when calling multiple times methods, like for instance signing 2 transactions in parallel.

this also fixes #97 , allowing multiple apps possible to be instanciated on the same transport.

when you try to call something that is "lock protected" when another thing is running (let's say signMessage is running), it will throw an exception "Ledger Device is busy (lock signMessage)".

@sgehrman would you mind checking if this fixed it for you? I have released version 4.3.0-beta.d226ed3b of each individual library on NPM that includes this PR changes.

Successfully published:
 - @ledgerhq/common@4.3.0-beta.d226ed3b
 - create-dapp@4.3.0-beta.d226ed3b
 - @ledgerhq/currencies@4.3.0-beta.d226ed3b
 - @ledgerhq/hw-app-btc@4.3.0-beta.d226ed3b
 - @ledgerhq/hw-app-eth@4.3.0-beta.d226ed3b
 - @ledgerhq/hw-app-str@4.3.0-beta.d226ed3b
 - @ledgerhq/hw-app-xrp@4.3.0-beta.d226ed3b
 - @ledgerhq/hw-hid-cli@4.3.0-beta.d226ed3b
 - @ledgerhq/hw-http-proxy-devserver@4.3.0-beta.d226ed3b
 - @ledgerhq/hw-transport-http@4.3.0-beta.d226ed3b
 - @ledgerhq/hw-transport-mocker@4.3.0-beta.d226ed3b
 - @ledgerhq/hw-transport-node-hid@4.3.0-beta.d226ed3b
 - @ledgerhq/hw-transport-u2f@4.3.0-beta.d226ed3b
 - @ledgerhq/hw-transport@4.3.0-beta.d226ed3b
 - @ledgerhq/react-native-hid@4.3.0-beta.d226ed3b
 - @ledgerhq/react-native-hw-transport-ble@4.3.0-beta.d226ed3b
 - @ledgerhq/web3-subprovider@4.3.0-beta.d226ed3b

thanks

@gre gre merged commit 2bdde42 into LedgerHQ:master Feb 26, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
2 participants