mirror of
https://github.com/shtorm-7/sing-box-extended.git
synced 2026-08-12 13:27:11 +03:00
Fix unified delay
This commit is contained in:
@@ -78,7 +78,7 @@ func getGroupDelay(server *Server) func(w http.ResponseWriter, r *http.Request)
|
||||
return
|
||||
}
|
||||
|
||||
ctx, cancel := context.WithTimeout(r.Context(), time.Millisecond*time.Duration(timeout))
|
||||
ctx, cancel := context.WithTimeout(server.ctx, time.Millisecond*time.Duration(timeout))
|
||||
defer cancel()
|
||||
|
||||
var result map[string]uint16
|
||||
|
||||
@@ -199,7 +199,7 @@ func getProxyDelay(server *Server) func(w http.ResponseWriter, r *http.Request)
|
||||
}
|
||||
|
||||
proxy := r.Context().Value(CtxKeyProxy).(adapter.Outbound)
|
||||
ctx, cancel := context.WithTimeout(context.Background(), time.Millisecond*time.Duration(timeout))
|
||||
ctx, cancel := context.WithTimeout(server.ctx, time.Millisecond*time.Duration(timeout))
|
||||
defer cancel()
|
||||
|
||||
delay, err := urltest.URLTest(ctx, url, proxy)
|
||||
|
||||
Reference in New Issue
Block a user