Skip to content

Commit b5d0794

Browse files
committed
fixed race condition
1 parent feafd21 commit b5d0794

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

fluent/sender.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@ def __init__(self,
4141

4242
self.socket = None
4343
self.pendings = None
44-
self.packer = msgpack.Packer()
4544
self.lock = threading.Lock()
4645

4746
try:
@@ -66,7 +65,7 @@ def _make_packet(self, label, timestamp, data):
6665
packet = (tag, timestamp, data)
6766
if self.verbose:
6867
print(packet)
69-
return self.packer.pack(packet)
68+
return msgpack.packb(packet)
7069

7170
def _send(self, bytes_):
7271
self.lock.acquire()

0 commit comments

Comments
 (0)