mirror of
https://gitee.com/milvus-io/milvus.git
synced 2025-12-08 10:08:42 +08:00
Ignore connection error when closing pulsar consumer (#22607)
Signed-off-by: Enwei Jiao <enwei.jiao@zilliz.com>
This commit is contained in:
parent
955bc06165
commit
f1ec78d3c1
@ -124,6 +124,13 @@ func (pc *Consumer) Close() {
|
|||||||
zap.Error(err))
|
zap.Error(err))
|
||||||
return nil
|
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
|
return err
|
||||||
}
|
}
|
||||||
// only close if unsubscribe successfully
|
// only close if unsubscribe successfully
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user