mirror of
https://github.com/songquanpeng/one-api.git
synced 2025-11-16 13:13:41 +08:00
🐛 fix: proxy bug (#49)
This commit is contained in:
@@ -38,6 +38,8 @@ func (h *HTTPClient) getClientFromPool(proxyAddr string) *http.Client {
|
||||
}
|
||||
|
||||
func (h *HTTPClient) returnClientToPool(client *http.Client) {
|
||||
// 清除代理设置
|
||||
client.Transport = nil
|
||||
clientPool.Put(client)
|
||||
}
|
||||
|
||||
|
||||
@@ -48,7 +48,7 @@ func GetChannel(channelType int, baseUrl, other, porxy, modelMapping string) mod
|
||||
Type: channelType,
|
||||
BaseURL: &baseUrl,
|
||||
Other: other,
|
||||
Proxy: porxy,
|
||||
Proxy: &porxy,
|
||||
ModelMapping: &modelMapping,
|
||||
Key: GetTestToken(),
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user