Fix variable naming issue inside listen method #180
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
I couldn't find any existing issues about it, but this is very simple patch regardless.
This PR fixes the
listen()
function using the same localoptions
variable twice despite them being two seperate objects (see the diff for an example).Additionally,
FFI.cast
only takes 2 arguments, however socketify was giving it 3. That has also been fixed.From my testing, this PR works perfectly, otherwise socketify hard crashes with FFI throwing an error for the additional argument.
The code I used to produce these issues in the first place:
Sorry if this goes against contribution guidelines, it's just way too simple of a fix to create an issue for in my opinion. It's also a very reproducible problem, I'm surprised I can't find anything about it in Github Issues.