Skip to content

Commit

Permalink
fix: fallback cannot be unfixed
Browse files Browse the repository at this point in the history
  • Loading branch information
xishang0128 committed Sep 2, 2024
1 parent 56fe7d5 commit 43f21c0
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions hub/route/groups.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,15 @@ func getGroupDelay(w http.ResponseWriter, r *http.Request) {
return
}

if proxy.(*adapter.Proxy).Type() == C.URLTest {
URLTestGroup := proxy.(*adapter.Proxy).ProxyAdapter.(*outboundgroup.URLTest)
URLTestGroup.ForceSet("")
switch proxy.(*adapter.Proxy).Type() {
case C.URLTest:
if urlTestGroup, ok := proxy.(*adapter.Proxy).ProxyAdapter.(*outboundgroup.URLTest); ok {
urlTestGroup.ForceSet("")
}
case C.Fallback:
if fallbackGroup, ok := proxy.(*adapter.Proxy).ProxyAdapter.(*outboundgroup.Fallback); ok {
fallbackGroup.ForceSet("")
}
}

if proxy.(*adapter.Proxy).Type() != C.Selector {
Expand Down

0 comments on commit 43f21c0

Please sign in to comment.