Repository navigation
[lua] Fix error when closing unused socket - #13159
Merged
Simn merged 5 commits intoNov 7, 2026
Merged
Conversation
Member
|
If this can be null we should wrap the type in Also did you check that the close function is the only place where this can happen? |
Member
Author
|
There are still other cases where you can cause an error by doing some operation that doesn't make sense on an unconnected or misconfigured socket. However, unlike close, what happens when you do that is quite inconsistent between targets (null exceptions, native exceptions, or nothing) and it would take more work to unify. In most of the cases it would probably be best to have proper haxe exceptions. I mainly wanted to do this because there is already a test that wanted this behaviour and had to have an |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
The test for #13031 had to have a guard for lua because it crashes when closing an unused socket. Now it is safe to call close on a socket that is unused, matching other targets.