Skip to content

Commit 139514f

Browse files
committed
fix data race
1 parent f4434cb commit 139514f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pulsar/producer_partition.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1738,10 +1738,10 @@ func (i *pendingItem) done(err error) {
17381738
return
17391739
}
17401740
i.isDone = true
1741-
buffersPool.Put(i.buffer)
17421741
if i.flushCallback != nil {
17431742
i.flushCallback(err)
17441743
}
1744+
buffersPool.Put(i.buffer)
17451745
}
17461746

17471747
// _setConn sets the internal connection field of this partition producer atomically.

0 commit comments

Comments
 (0)