Browse Source

Fix critical bug encoding produce requests

Evan Huus 12 years ago
parent
commit
7ce2a728cf
1 changed files with 2 additions and 0 deletions
  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()
 		}
 	}
 }