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 crash when a client sends empty fields #20

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

cheapie
Copy link

@cheapie cheapie commented Sep 13, 2024

Fixes #18

This prevents the server from crashing if a locked node receives fields where "locks_sent_lock_command" is nil. This seems to happen occasionally with some clients for reasons I have not yet identified. I suspect it has something to do with the user doing something "invalid" for the current page and may even involve a race condition, but... regardless, this just changes it so that if nothing was sent for it to do then it just doesn't do anything.

As a side note, the "locks_sent_lock_command" field doesn't seem to ever actually be used, but I left the code for handing it in place as I'm assuming there's some reason behind it.

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.

locks/init.lua:493: attempt to index field 'locks_sent_lock_command' (a nil value)
1 participant