mirror of
https://github.com/bisq-network/bisq.git
synced 2024-11-20 02:12:00 +01:00
Remove redundant closing of connection
Fixes #4052, as the peer.close() already calls closeConnection if a writeTarget is established successfully.
This commit is contained in:
parent
066614f966
commit
c306781252
@ -229,11 +229,10 @@ public class LocalBitcoinNode {
|
||||
var originalNioClientLoggerLevel = silence(NioClient.class);
|
||||
var originalNioClientManagerLoggerLevel = silence(NioClientManager.class);
|
||||
|
||||
NioClient client;
|
||||
try {
|
||||
log.info("Initiating attempt to connect to and handshake with a local " +
|
||||
"Bitcoin node (which may or may not be running) on port {}.", port);
|
||||
client = createClient(peer, port, CONNECTION_TIMEOUT);
|
||||
createClient(peer, port, CONNECTION_TIMEOUT);
|
||||
} catch (IOException ex) {
|
||||
log.error("Local bitcoin node handshake attempt was unexpectedly interrupted", ex);
|
||||
return Optional.empty();
|
||||
@ -251,7 +250,6 @@ public class LocalBitcoinNode {
|
||||
}
|
||||
|
||||
peer.close();
|
||||
client.closeConnection();
|
||||
|
||||
restoreLoggerLevel(NioClient.class, originalNioClientLoggerLevel);
|
||||
restoreLoggerLevel(NioClientManager.class, originalNioClientManagerLoggerLevel);
|
||||
|
Loading…
Reference in New Issue
Block a user