Commit 81f1091a4fd7d6a8405664009f61d381055fc71e

Authored by Volodymyr Babak
1 parent 79089ad6

Sync should be send only once or by force button

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