Suppress new context closed errors (#2947)

This commit is contained in:
DingDongSoLong4
2022-09-26 03:41:28 +02:00
committed by GitHub
parent d4e706daef
commit 00820a8789
2 changed files with 6 additions and 2 deletions

View File

@@ -545,7 +545,9 @@ func (rs sceneRoutes) SceneCtx(next http.Handler) http.Handler {
if scene != nil {
if err := scene.LoadPrimaryFile(ctx, rs.fileFinder); err != nil {
logger.Errorf("error loading primary file for scene %d: %v", sceneID, err)
if !errors.Is(err, context.Canceled) {
logger.Errorf("error loading primary file for scene %d: %v", sceneID, err)
}
// set scene to nil so that it doesn't try to use the primary file
scene = nil
}