mirror of
https://github.com/bisq-network/bisq.git
synced 2025-02-24 07:07:43 +01:00
reformat exception handling
This commit is contained in:
parent
ba229cf5d2
commit
f5253c885f
1 changed files with 6 additions and 6 deletions
|
@ -249,13 +249,13 @@ public class LocalBitcoinNode {
|
||||||
try {
|
try {
|
||||||
var peerVersionMessage = peerVersionMessageFuture.get(HANDSHAKE_TIMEOUT, TimeUnit.MILLISECONDS);
|
var peerVersionMessage = peerVersionMessageFuture.get(HANDSHAKE_TIMEOUT, TimeUnit.MILLISECONDS);
|
||||||
optionalPeerVersionMessage = Optional.of(peerVersionMessage);
|
optionalPeerVersionMessage = Optional.of(peerVersionMessage);
|
||||||
} catch (ExecutionException | InterruptedException | CancellationException | TimeoutException ex) {
|
} catch (ExecutionException | InterruptedException | CancellationException ex) {
|
||||||
optionalPeerVersionMessage = Optional.empty();
|
optionalPeerVersionMessage = Optional.empty();
|
||||||
if (ex instanceof TimeoutException) {
|
} catch (TimeoutException ex) {
|
||||||
log.error("Exploratory handshake attempt with a local Bitcoin node (that may not be there)" +
|
optionalPeerVersionMessage = Optional.empty();
|
||||||
" unexpectedly timed out. This should never happen; please report this. HANDSHAKE_TIMEOUT" +
|
log.error("Exploratory handshake attempt with a local Bitcoin node (that may not be there)" +
|
||||||
" is {} ms. Continuing as if a local BTC node was not found.", HANDSHAKE_TIMEOUT);
|
" unexpectedly timed out. This should never happen; please report this. HANDSHAKE_TIMEOUT" +
|
||||||
}
|
" is {} ms. Continuing as if a local BTC node was not found.", HANDSHAKE_TIMEOUT);
|
||||||
}
|
}
|
||||||
|
|
||||||
peer.close();
|
peer.close();
|
||||||
|
|
Loading…
Add table
Reference in a new issue