Skip to content

Commit 47a71bd

Browse files
committed
Use clear_queue() across the QueuedClient class
1 parent 732bd21 commit 47a71bd

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

riemann_client/client.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,12 +92,12 @@ class QueuedClient(Client):
9292

9393
def __init__(self, *args, **kwargs):
9494
super(QueuedClient, self).__init__(*args, **kwargs)
95-
self.queue = riemann_client.riemann_pb2.Msg()
95+
self.clear_queue()
9696

9797
def flush(self):
9898
"""Sends the waiting message to Riemann"""
9999
self.transport.send(self.queue)
100-
self.queue = riemann_client.riemann_pb2.Msg()
100+
self.clear_queue()
101101

102102
def send_event(self, event):
103103
self.queue.events.add().MergeFrom(event)

0 commit comments

Comments
 (0)