diff --git a/subscriber.go b/subscriber.go index 7e1376a..88f09f8 100644 --- a/subscriber.go +++ b/subscriber.go @@ -121,7 +121,7 @@ func (s *Subscriber) poll(ctx context.Context) { tps := tp{t, p} s.mu.Lock() c := s.consumers[tps] - s.mu.Unlock() + s.mu.RUnlock() if c != nil { c.recs <- newErrorFetchTopicPartition(err, t, p) }