mirror of
https://github.com/haveno-dex/haveno.git
synced 2025-07-31 18:58:51 -04:00
Remove awaitUninterruptibly() in listener (can cause a deadlock)
This commit is contained in:
parent
74fa325aee
commit
f91b0ba349
1 changed files with 7 additions and 7 deletions
|
@ -152,7 +152,7 @@ public class BootstrappedPeerFactory {
|
|||
FutureDiscover futureDiscover;
|
||||
|
||||
// just temporary while port forwarding is not working
|
||||
lastSuccessfulBootstrap = "relay";
|
||||
//lastSuccessfulBootstrap = "relay";
|
||||
|
||||
switch (lastSuccessfulBootstrap) {
|
||||
case "relay":
|
||||
|
@ -203,7 +203,7 @@ public class BootstrappedPeerFactory {
|
|||
@Override
|
||||
public void exceptionCaught(Throwable t) throws Exception {
|
||||
setState("Exception at discover: " + t.getMessage(), false);
|
||||
peerDHT.shutdown().awaitUninterruptibly();
|
||||
peerDHT.shutdown();
|
||||
settableFuture.setException(t);
|
||||
}
|
||||
});
|
||||
|
@ -231,7 +231,7 @@ public class BootstrappedPeerFactory {
|
|||
@Override
|
||||
public void exceptionCaught(Throwable t) throws Exception {
|
||||
setState("Exception at port forwarding: " + t.getMessage(), false);
|
||||
peerDHT.shutdown().awaitUninterruptibly();
|
||||
peerDHT.shutdown();
|
||||
settableFuture.setException(t);
|
||||
}
|
||||
});
|
||||
|
@ -253,7 +253,7 @@ public class BootstrappedPeerFactory {
|
|||
setState("Discover with automatic port forwarding has failed " + futureDiscover
|
||||
.failedReason(), false);
|
||||
persistence.write(BootstrappedPeerFactory.this, "lastSuccessfulBootstrap", "default");
|
||||
peerDHT.shutdown().awaitUninterruptibly();
|
||||
peerDHT.shutdown();
|
||||
settableFuture.setException(new Exception("Discover with automatic port forwarding failed " +
|
||||
futureDiscover.failedReason()));
|
||||
}
|
||||
|
@ -263,7 +263,7 @@ public class BootstrappedPeerFactory {
|
|||
public void exceptionCaught(Throwable t) throws Exception {
|
||||
setState("Exception at discover: " + t, false);
|
||||
persistence.write(BootstrappedPeerFactory.this, "lastSuccessfulBootstrap", "default");
|
||||
peerDHT.shutdown().awaitUninterruptibly();
|
||||
peerDHT.shutdown();
|
||||
settableFuture.setException(t);
|
||||
}
|
||||
});
|
||||
|
@ -286,7 +286,7 @@ public class BootstrappedPeerFactory {
|
|||
setState("Bootstrap using relay has failed " + futureRelayNAT.failedReason(), false);
|
||||
persistence.write(BootstrappedPeerFactory.this, "lastSuccessfulBootstrap", "default");
|
||||
futureRelayNAT.shutdown();
|
||||
peerDHT.shutdown().awaitUninterruptibly();
|
||||
peerDHT.shutdown();
|
||||
settableFuture.setException(new Exception("Bootstrap using relay failed " +
|
||||
futureRelayNAT.failedReason()));
|
||||
}
|
||||
|
@ -297,7 +297,7 @@ public class BootstrappedPeerFactory {
|
|||
setState("Exception at bootstrapWithRelay: " + t, false);
|
||||
persistence.write(BootstrappedPeerFactory.this, "lastSuccessfulBootstrap", "default");
|
||||
futureRelayNAT.shutdown();
|
||||
peerDHT.shutdown().awaitUninterruptibly();
|
||||
peerDHT.shutdown();
|
||||
settableFuture.setException(t);
|
||||
}
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue