Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hotfix for runtime err in monitoring agent #1259

Merged
merged 1 commit into from
Nov 8, 2022

Conversation

seokho-son
Copy link
Member

No description provided.

@@ -265,7 +265,6 @@ func CallMonitoringAsync(wg *sync.WaitGroup, nsID string, mcisID string, mcisSer

result = string(body)
}
defer res.Body.Close()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

L264 에서 이미 defer res.Body.Close() 를 했는데, 여기서 또 수행하려니 런타임 에러가 났던걸까요.. ㅎㅎ

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

L264 에서 이미 defer res.Body.Close() 를 했는데, 여기서 또 수행하려니 런타임 에러가 났던걸까요.. ㅎㅎ

@jihoon-seo
api호출 오류(cb-df로 호츌이 타임아웃을 내뿜을 때)가 발생했을 때
res 가 nil 인데 close 하려고 해서 발생하는 닐포인터 애러입니당! :)

이미 nil인 경우를 대비해서 close를 하고 있어서. 삭제만 하였습니다. :)

@jihoon-seo jihoon-seo merged commit 8d63322 into cloud-barista:main Nov 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants