From 9ebfdfd0491b1a78e118d13791b729ac3cb540a4 Mon Sep 17 00:00:00 2001 From: mountain Date: Tue, 9 Jan 2024 20:28:24 +0900 Subject: [PATCH] =?UTF-8?q?=EC=9D=8C=EC=84=B1=EC=B1=84=ED=8C=85=20?= =?UTF-8?q?=EC=A4=91=EB=8B=A8=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- voicechat/eos_impl.go | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/voicechat/eos_impl.go b/voicechat/eos_impl.go index 9f51fdf..99f20d2 100644 --- a/voicechat/eos_impl.go +++ b/voicechat/eos_impl.go @@ -132,9 +132,15 @@ func (gv *eosauth) leaveVoiceChat(data LeaveVoiceChatRequst) { req.Header.Set("Content-Type", "application/json") req.Header.Set("Authorization", fmt.Sprintf("Bearer %s", accessToken)) resp, err := http.DefaultClient.Do(req) + if err != nil { logger.Println("LeaveVoiceChat failed. err :", err) - } else if resp.StatusCode != http.StatusOK { + return + } + + defer resp.Body.Close() + if resp.StatusCode != http.StatusNoContent { + // 204가 정상 응답 logger.Println("LeaveVoiceChat failed. status code :", resp.StatusCode) } }