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

fix: Reddison Lock을 얻을 때 타임아웃이 발생한다면 unlock을 호출하지 않도록 한다. #344

Merged
merged 1 commit into from
Aug 29, 2024

Conversation

HiiWee
Copy link
Member

@HiiWee HiiWee commented Aug 29, 2024

📄 Summary

락을 얻지 못한다면 tryLock에서 대기하다가 타임아웃이 끝나면 예외가 발생합니다. 따라서 무조건적으로 finally를 호출하게 되는데 이때 락을 얻지 못한 상태에서 호출한다면 IllegalMonitorStateException이 발생합니다.

따라서 try-catch문 바깥에서 Lock을 얻도록 변경합니다.

🙋🏻 More

close #343

@HiiWee HiiWee requested a review from a team August 29, 2024 08:40
@HiiWee HiiWee self-assigned this Aug 29, 2024
@HiiWee HiiWee added the REFACTOR 코드 개선 label Aug 29, 2024
Copy link
Contributor

@yudonggeun yudonggeun left a comment

Choose a reason for hiding this comment

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

LGTM 👍 👍 👍 👍

@HiiWee HiiWee changed the title fix: fix: Reddison Lock을 얻을 때 타임아웃이 발생한다면 unlock을 호출하지 않도록 한다. Aug 29, 2024
@HiiWee HiiWee merged commit 66f011c into dev2 Aug 29, 2024
2 checks passed
@chhs2131 chhs2131 deleted the fix/343 branch August 31, 2024 13:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
REFACTOR 코드 개선
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] Reddison Lock을 얻을 때 타임아웃이 발생한다면 unlock을 호출하면 안된다.
2 participants