Merge pull request #12282 from jekka001/fix/edge-hp-events
Fix widget type sync up
This commit is contained in:
commit
d87d1d553d
@ -135,7 +135,7 @@ public abstract class EdgeGrpcSession implements Closeable {
|
||||
private StreamObserver<RequestMsg> inputStream;
|
||||
private StreamObserver<ResponseMsg> outputStream;
|
||||
|
||||
private boolean connected;
|
||||
private volatile boolean connected;
|
||||
private volatile boolean syncCompleted;
|
||||
|
||||
private EdgeVersion edgeVersion;
|
||||
@ -536,6 +536,7 @@ public abstract class EdgeGrpcSession implements Closeable {
|
||||
|
||||
public void processHighPriorityEvents() {
|
||||
try {
|
||||
if (isConnected() && isSyncCompleted()) {
|
||||
List<EdgeEvent> highPriorityEvents = new ArrayList<>();
|
||||
EdgeEvent event;
|
||||
while ((event = highPriorityQueue.poll()) != null) {
|
||||
@ -543,6 +544,7 @@ public abstract class EdgeGrpcSession implements Closeable {
|
||||
}
|
||||
List<DownlinkMsg> downlinkMsgsPack = convertToDownlinkMsgsPack(highPriorityEvents);
|
||||
sendDownlinkMsgsPack(downlinkMsgsPack).get();
|
||||
}
|
||||
} catch (Exception e) {
|
||||
log.error("[{}] Failed to process high priority events", sessionId, e);
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user