mirror of
https://github.com/QuantumNous/new-api.git
synced 2026-09-13 15:54:34 +00:00
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:
@@ -282,7 +282,7 @@ func doRequest(req *http.Request, info *relaycommon.RelayInfo) (*http.Response,
|
||||
var client *http.Client
|
||||
var err error // 声明 err 变量
|
||||
if info.ChannelSetting.Proxy != "" {
|
||||
client, err = service.NewProxyHttpClient(info.ChannelSetting.Proxy)
|
||||
client, err = service.GetHttpClientWithProxy(info.ChannelSetting.Proxy)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("new proxy http client failed: %w", err)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user