You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When an exception raised the whole thread gets stuck and no messages are written to the log.
The messages are shown when the server stops, or when all available threads terminate (and the server crashes).
I guess it's because there is direct Ruby C API function call instead of RubyCaller call
Yes, you're correct.
However, RubyCaller wouldn't help to fix this issue, because the issue is in the RubyCaller implementation.
The best solution is to redesign the RubyCaller implementation so it always protects against exceptions, so it will wrap the code and protect it at this point.
At the moment, RubyCaller only protects against exceptions if the GVL state needs to be updated when entering Ruby code, not when entering C code.
I wrote a fix in the 0.5.0 version branch, I will see if I can back port it to the 0.4.x version branch.
…ven on C functions
@haukot opened issue #26 that exposed an exception handling issue,
where exceptions weren’t handled when the GVL was entered using
`RubyCaller.call_c` rather than a Ruby `RubyCaller.call`.
This redesigned implementation should solve the issue.
Hi,
I found that iodine doesn't handle exceptions raised in on_message and on_data callbacks.
Example app:
When an exception raised the whole thread gets stuck and no messages are written to the log.
The messages are shown when the server stops, or when all available threads terminate (and the server crashes).
I guess it's because there is direct Ruby C API function call instead of RubyCaller call
https://github.com/boazsegev/iodine/blob/master/ext/iodine/iodine_websockets.c#L683
there should probably be something like this:
The text was updated successfully, but these errors were encountered: