fix(channel): improve proxy client compatibility and cache lifecycle (#6157)

* fix(channel): improve proxy client compatibility and cache lifecycle

* test(controller): use non-fatal assertions for channel tests
This commit is contained in:
yyhhyyyyyy
2026-07-20 18:11:22 +08:00
committed by GitHub
parent 08677566f8
commit e13d4033e5
26 changed files with 537 additions and 147 deletions
+2 -2
View File
@@ -114,7 +114,7 @@ func exchangeJwtForAccessToken(signedJWT string, info *relaycommon.RelayInfo) (s
var client *http.Client
var err error
if info.ChannelSetting.Proxy != "" {
client, err = service.NewProxyHttpClient(info.ChannelSetting.Proxy)
client, err = service.GetHttpClientWithProxy(info.ChannelSetting.Proxy)
if err != nil {
return "", fmt.Errorf("new proxy http client failed: %w", err)
}
@@ -157,7 +157,7 @@ func exchangeJwtForAccessTokenWithProxy(signedJWT string, proxy string) (string,
var client *http.Client
var err error
if proxy != "" {
client, err = service.NewProxyHttpClient(proxy)
client, err = service.GetHttpClientWithProxy(proxy)
if err != nil {
return "", fmt.Errorf("new proxy http client failed: %w", err)
}