瀏覽代碼

fix: skip checking stream.log outdated (#2250)

Signed-off-by: yisaer <disxiaofei@163.com>
Song Gao 1 年之前
父節點
當前提交
83bfbc3454
共有 1 個文件被更改,包括 3 次插入0 次删除
  1. 3 0
      internal/conf/conf.go

+ 3 - 0
internal/conf/conf.go

@@ -379,6 +379,9 @@ func gcOutdatedLog(filePath string, maxDuration time.Duration) {
 }
 
 func isLogOutdated(name string, now time.Time, maxDuration time.Duration) bool {
+	if name == logFileName {
+		return false
+	}
 	layout := ".2006-01-02_15-04-05"
 	logDateExt := path.Ext(name)
 	if t, err := time.Parse(layout, logDateExt); err != nil {