Browse Source

Fix critical bug encoding produce requests

Evan Huus 12 năm trước cách đây
mục cha
commit
7ce2a728cf
1 tập tin đã thay đổi với 2 bổ sung0 xóa
  1. 2 0
      protocol/produce_request.go

+ 2 - 0
protocol/produce_request.go

@@ -22,7 +22,9 @@ func (p *ProduceRequest) encode(pe packetEncoder) {
 		pe.putArrayCount(len(partitions))
 		for id, msgSet := range partitions {
 			pe.putInt32(id)
+			pe.pushLength32()
 			msgSet.encode(pe)
+			pe.pop()
 		}
 	}
 }