Skip to content

Fix crash when a client sends empty fields#20

Open
cheapie wants to merge 1 commit intoSokomine:masterfrom
cheapie:fix-18
Open

Fix crash when a client sends empty fields#20
cheapie wants to merge 1 commit intoSokomine:masterfrom
cheapie:fix-18

Conversation

@cheapie
Copy link
Copy Markdown

@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