在升级失败(状态码非 101)和写入响应失败时,确保 resp.Body.Close()。 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>