瀏覽代碼

Merge pull request #35064 from LK4D4/replace_timer

Replace NewTimer().C with After
Victor Vieux 7 年之前
父節點
當前提交
b6aa01570c
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      api/server/router/system/system_routes.go

+ 1 - 1
api/server/router/system/system_routes.go

@@ -123,7 +123,7 @@ func (s *systemRouter) getEvents(ctx context.Context, w http.ResponseWriter, r *
 
 
 		if !onlyPastEvents {
 		if !onlyPastEvents {
 			dur := until.Sub(now)
 			dur := until.Sub(now)
-			timeout = time.NewTimer(dur).C
+			timeout = time.After(dur)
 		}
 		}
 	}
 	}