Skip to content

Commit

Permalink
Small refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
svpcom committed Nov 11, 2019
1 parent b0b88d7 commit 5474bf9
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions telemetry/proxy.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,9 @@ def _cleanup(self):

def flush_queue(self):
if self.agg_queue_size > 0:
if self.agg_queue_timer is not None:
if not self.agg_queue_timer.called:
self.agg_queue_timer.cancel()
if self.agg_queue_timer is not None \
and not self.agg_queue_timer.called:
self.agg_queue_timer.cancel()
self.agg_queue_timer = None
self._send_to_peer(b''.join(self.agg_queue))
self.agg_queue = []
Expand Down

0 comments on commit 5474bf9

Please sign in to comment.