prevent spamming of 'stream is closed' error during shutdown (#6062)

This commit is contained in:
Alessandro Ros
2026-08-08 19:41:06 +02:00
committed by GitHub
parent 97b404349c
commit b615b7312c
+4 -4
View File
@@ -279,10 +279,6 @@ func (pa *path) run() {
req.Res <- defs.PathAddReaderRes{Err: fmt.Errorf("terminated")}
}
if pa.stream != nil {
pa.setNotAvailable()
}
if pa.source != nil {
if source, ok := pa.source.(*staticsources.Handler); ok {
if !pa.conf.SourceOnDemand || pa.onDemandStaticSourceState != pathOnDemandStateInitial {
@@ -297,6 +293,10 @@ func (pa *path) run() {
pa.onUnDemandHook("path destroyed")
}
if pa.stream != nil {
pa.setNotAvailable()
}
pa.Log(logger.Debug, "destroyed: %v", err)
}