Sync should be send only once or by force button

This commit is contained in:
Volodymyr Babak 2020-12-23 12:28:47 +02:00
parent 79089ad642
commit 81f1091a4f

View File

@ -160,10 +160,11 @@ public final class EdgeGrpcSession implements Closeable {
.build()); .build());
if (ConnectResponseCode.ACCEPTED != responseMsg.getResponseCode()) { if (ConnectResponseCode.ACCEPTED != responseMsg.getResponseCode()) {
outputStream.onError(new RuntimeException(responseMsg.getErrorMsg())); outputStream.onError(new RuntimeException(responseMsg.getErrorMsg()));
} else {
connected = true;
} }
} }
if (!connected && requestMsg.getMsgType().equals(RequestMsgType.SYNC_REQUEST_RPC_MESSAGE)) { if (connected && requestMsg.getMsgType().equals(RequestMsgType.SYNC_REQUEST_RPC_MESSAGE)) {
connected = true;
ctx.getSyncEdgeService().sync(edge); ctx.getSyncEdgeService().sync(edge);
} }
if (connected) { if (connected) {