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

Set player_info.last_update when no update was required #21

Merged

Conversation

mini-bomba
Copy link
Contributor

This makes it so that after every successful FORCE_UPDATE request, the value returned by PLAYER_UPDATE_TIMESTAMP requests is reset 0.

@techmetx11
Copy link
Collaborator

Thank you for your contribution

@techmetx11 techmetx11 merged commit 52097ac into iv-org:master Aug 17, 2024
1 check passed
@mini-bomba mini-bomba deleted the set_lastupdate_on_already_updated branch August 17, 2024 16:56
@SamantazFox
Copy link
Member

However, the lock is not release in that case...

@techmetx11
Copy link
Collaborator

techmetx11 commented Aug 17, 2024

However, the lock is not release in that case...

Automatically gets dropped when out-of-scope/function returns (at least I hope so)
The mutex dropping is moved to after the if condition, to allow the code to set the current_player_info.last_update value. If it was before, then it wouldn't be able to

@mini-bomba
Copy link
Contributor Author

Yes, the lock is automatically dropped & released when the return statement is hit.
RAII ❤️

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.

3 participants