File tree Expand file tree Collapse file tree 1 file changed +15
-15
lines changed Expand file tree Collapse file tree 1 file changed +15
-15
lines changed Original file line number Diff line number Diff line change @@ -848,21 +848,6 @@ type pendingItem struct {
848848 flushCallback func (err error )
849849}
850850
851- func (i * pendingItem ) done (err error ) {
852- if i .isDone {
853- return
854- }
855- i .isDone = true
856- buffersPool .Put (i .buffer )
857- if i .flushCallback != nil {
858- i .flushCallback (err )
859- }
860-
861- if i .cancel != nil {
862- i .cancel ()
863- }
864- }
865-
866851func (p * partitionProducer ) internalFlushCurrentBatch () {
867852 if p .batchBuilder == nil {
868853 // batch is not enabled
@@ -1752,6 +1737,21 @@ type flushRequest struct {
17521737 err error
17531738}
17541739
1740+ func (i * pendingItem ) done (err error ) {
1741+ if i .isDone {
1742+ return
1743+ }
1744+ i .isDone = true
1745+ buffersPool .Put (i .buffer )
1746+ if i .flushCallback != nil {
1747+ i .flushCallback (err )
1748+ }
1749+
1750+ if i .cancel != nil {
1751+ i .cancel ()
1752+ }
1753+ }
1754+
17551755// _setConn sets the internal connection field of this partition producer atomically.
17561756// Note: should only be called by this partition producer when a new connection is available.
17571757func (p * partitionProducer ) _setConn (conn internal.Connection ) {
You can’t perform that action at this time.
0 commit comments