Deactivate success check for GetPeerAddress, User baseFuture.isSuccess()

This commit is contained in:
Manfred Karrer 2014-11-11 02:56:28 +01:00
parent 4a765cd27a
commit 28edc0bf60
2 changed files with 9 additions and 7 deletions

View File

@ -116,13 +116,15 @@ class TomP2PMessageFacade implements MessageFacade {
futureGet.addListener(new BaseFutureAdapter<BaseFuture>() {
@Override
public void operationComplete(BaseFuture baseFuture) throws Exception {
if (isSuccess(baseFuture) && futureGet.data() != null) {
final Peer peer = (Peer) futureGet.data().object();
Platform.runLater(() -> listener.onResult(peer));
}
//TODO just deactivated temporary because in relay mode with 2 local peers isSuccess returns false
//if (isSuccess(baseFuture) && futureGet.data() != null) {
final Peer peer = (Peer) futureGet.data().object();
Platform.runLater(() -> listener.onResult(peer));
/* }
else {
log.error("getPeerAddress failed. failedReason = " + baseFuture.failedReason());
Platform.runLater(listener::onFailed);
}
}*/
}
});
}
@ -144,6 +146,7 @@ class TomP2PMessageFacade implements MessageFacade {
Platform.runLater(listener::onResult);
}
else {
log.error("sendMessage failed with reason " + futureDirect.failedReason());
Platform.runLater(listener::onFailed);
}
}

View File

@ -23,7 +23,6 @@ public class BaseFutureUtil {
// Isolate the success handling as there is bug in port forwarding mode
public static boolean isSuccess(BaseFuture baseFuture) {
// return baseFuture.isSuccess();
return true;
return baseFuture.isSuccess();
}
}