fix: close resp body

Signed-off-by: guoguangwu <guoguangwug@gmail.com>
This commit is contained in:
guangwu 2024-04-19 16:44:38 +08:00 committed by guoguangwu
parent 9897959731
commit dd2b3a04a4
No known key found for this signature in database
GPG key ID: E85F4CC0A5161CB2

View file

@ -83,6 +83,7 @@ func CreateSession(
if err != nil {
return "", err
}
defer resp.Body.Close()
// Error if the status isn't OK
if resp.StatusCode != http.StatusOK {