Commit 81f1091a4fd7d6a8405664009f61d381055fc71e
1 parent
79089ad6
Sync should be send only once or by force button
Showing
1 changed file
with
3 additions
and
2 deletions
... | ... | @@ -160,10 +160,11 @@ public final class EdgeGrpcSession implements Closeable { |
160 | 160 | .build()); |
161 | 161 | if (ConnectResponseCode.ACCEPTED != responseMsg.getResponseCode()) { |
162 | 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 | 168 | ctx.getSyncEdgeService().sync(edge); |
168 | 169 | } |
169 | 170 | if (connected) { | ... | ... |