Skip to content

Commit 2b634f8

Browse files
Added count locks to termintation callback in GroupedDataSubscriber
1 parent 26f4070 commit 2b634f8

File tree

1 file changed

+6
-1
lines changed
  • examples/groupeddatasubscribe

1 file changed

+6
-1
lines changed

examples/groupeddatasubscribe/main.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -308,7 +308,12 @@ def _connection_terminated(self):
308308
self._lastmessage = 0.0
309309

310310
# Reset grouped data on disconnect
311-
self._downsampled_count = 0
311+
with self._downsampled_count_lock:
312+
self._downsampled_count = 0
313+
314+
# Reset process missed count on disconnect
315+
with self._process_missed_count_lock:
316+
self._process_missed_count += 1
312317

313318

314319
def main():

0 commit comments

Comments
 (0)