修复套餐创建事务回滚失败问题;修复 http dump 未根据环境配置打印问题;简化通道分配时计时输出

This commit is contained in:
2025-05-09 11:10:17 +08:00
parent 623e9652d9
commit 7c684ca0ad
7 changed files with 42 additions and 53 deletions

View File

@@ -319,11 +319,13 @@ func (c *cloud) token(refresh bool) (string, error) {
_ = Body.Close()
}(resp.Body)
dump, err := httputil.DumpResponse(resp, true)
if err != nil {
return "", err
if env.DebugHttpDump {
dump, err := httputil.DumpResponse(resp, true)
if err != nil {
return "", err
}
fmt.Println(string(dump))
}
fmt.Println(string(dump))
if resp.StatusCode != http.StatusOK {
return "", errors.New("failed to get token")