Burke Libbey 12 лет назад
Родитель
Сommit
7b7dcc88ff
1 измененных файлов с 5 добавлено и 1 удалено
  1. 5 1
      producer.go

+ 5 - 1
producer.go

@@ -111,7 +111,11 @@ func (p *Producer) Errors() chan error {
 // it may otherwise leak memory. You must call this before calling Close on the
 // it may otherwise leak memory. You must call this before calling Close on the
 // underlying client.
 // underlying client.
 func (p *Producer) Close() error {
 func (p *Producer) Close() error {
-	// TODO
+	p.m.Lock()
+	defer p.m.Unlock()
+	for _, bp := range p.brokerProducers {
+		bp.Close()
+	}
 	return nil
 	return nil
 }
 }