فهرست منبع

Replace NewTimer().C with After

It is the same thing

Signed-off-by: Alexander Morozov <lk4d4math@gmail.com>
Alexander Morozov 7 سال پیش
والد
کامیت
1a517a4a42
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)
 		}
 		}
 	}
 	}