mirror of https://github.com/milvus-io/milvus.git
Ignore connection error when closing pulsar consumer (#22607)
Signed-off-by: Enwei Jiao <enwei.jiao@zilliz.com>pull/22628/head
parent
955bc06165
commit
f1ec78d3c1
|
@ -124,6 +124,13 @@ func (pc *Consumer) Close() {
|
|||
zap.Error(err))
|
||||
return nil
|
||||
}
|
||||
// Pulsar will automatically clean up subscriptions without consumers, so we can ignore this type of error.
|
||||
if strings.Contains(err.Error(), "connection closed") {
|
||||
log.Warn("connection closed, skip unsubscribe",
|
||||
zap.String("subscription", pc.Subscription()),
|
||||
zap.Error(err))
|
||||
return nil
|
||||
}
|
||||
return err
|
||||
}
|
||||
// only close if unsubscribe successfully
|
||||
|
|
Loading…
Reference in New Issue