mirror of
https://github.com/haveno-dex/haveno.git
synced 2025-09-22 22:15:38 -04:00
Deactivate success check for GetPeerAddress, User baseFuture.isSuccess()
This commit is contained in:
parent
4a765cd27a
commit
28edc0bf60
2 changed files with 9 additions and 7 deletions
|
@ -116,13 +116,15 @@ class TomP2PMessageFacade implements MessageFacade {
|
||||||
futureGet.addListener(new BaseFutureAdapter<BaseFuture>() {
|
futureGet.addListener(new BaseFutureAdapter<BaseFuture>() {
|
||||||
@Override
|
@Override
|
||||||
public void operationComplete(BaseFuture baseFuture) throws Exception {
|
public void operationComplete(BaseFuture baseFuture) throws Exception {
|
||||||
if (isSuccess(baseFuture) && futureGet.data() != null) {
|
//TODO just deactivated temporary because in relay mode with 2 local peers isSuccess returns false
|
||||||
final Peer peer = (Peer) futureGet.data().object();
|
//if (isSuccess(baseFuture) && futureGet.data() != null) {
|
||||||
Platform.runLater(() -> listener.onResult(peer));
|
final Peer peer = (Peer) futureGet.data().object();
|
||||||
}
|
Platform.runLater(() -> listener.onResult(peer));
|
||||||
|
/* }
|
||||||
else {
|
else {
|
||||||
|
log.error("getPeerAddress failed. failedReason = " + baseFuture.failedReason());
|
||||||
Platform.runLater(listener::onFailed);
|
Platform.runLater(listener::onFailed);
|
||||||
}
|
}*/
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -144,6 +146,7 @@ class TomP2PMessageFacade implements MessageFacade {
|
||||||
Platform.runLater(listener::onResult);
|
Platform.runLater(listener::onResult);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
log.error("sendMessage failed with reason " + futureDirect.failedReason());
|
||||||
Platform.runLater(listener::onFailed);
|
Platform.runLater(listener::onFailed);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -23,7 +23,6 @@ public class BaseFutureUtil {
|
||||||
|
|
||||||
// Isolate the success handling as there is bug in port forwarding mode
|
// Isolate the success handling as there is bug in port forwarding mode
|
||||||
public static boolean isSuccess(BaseFuture baseFuture) {
|
public static boolean isSuccess(BaseFuture baseFuture) {
|
||||||
// return baseFuture.isSuccess();
|
return baseFuture.isSuccess();
|
||||||
return true;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue