[bisq-network/bisq] Give LocalBitcoinNode a timeout in case BitcoinJ hangs during handshake attempt (#4058)
notifications at github.com
Fri Mar 13 15:00:47 UTC 2020
@wiz discovered (#4057) than in some cases LocalBitcoinNode will hang during Bisq setup. This patch gives LocalBitcoinNode's handshake attempt a timeout. Specifically, the part where we block while waiting for BitcoinJ to attempt to return a local BTC node's VersionMessage. I had not originally implemented a timeout, because I was under the impression that in such a case the NioClient would timeout (which does have a timeout).
@wiz has tested this patch and verified that this is the cause and that with this patch Bisq handles BitcoinJ hanging gracefully (by timing out the relevant future after 5000 ms).
This patch also prints an error in case a timeout happens, because it normally shouldn't.
The underlying cause is unknown, but seems to come from BitcoinJ.
You can view, comment on, or merge this pull request online at:
-- Commit Summary --
* put in future timeout in case bitcoinj hangs
-- File Changes --
M core/src/main/java/bisq/core/btc/nodes/LocalBitcoinNode.java (12)
-- Patch Links --
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the bisq-github