Explorar o código

Merge pull request #35064 from LK4D4/replace_timer

Replace NewTimer().C with After
Victor Vieux %!s(int64=7) %!d(string=hai) anos
pai
achega
b6aa01570c
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  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 {
 			dur := until.Sub(now)
-			timeout = time.NewTimer(dur).C
+			timeout = time.After(dur)
 		}
 	}