Commit d3e832d
committed
Guard close() in io callbacks against dead connections
When handle_io_in raises because the connection is already dead
(thisptr == NULL), the error handler called close() which raised a
second ReferenceError. This unhandled exception escaped the cdef
callback, corrupting C-side buffer state and triggering
g_string_erase assertion failures.
Check thisptr before calling close() in both handle_io_in_cb and
handle_io_out_cb error handlers.1 parent 5c5988f commit d3e832d
1 file changed
+4
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
825 | 825 | | |
826 | 826 | | |
827 | 827 | | |
828 | | - | |
| 828 | + | |
| 829 | + | |
829 | 830 | | |
830 | 831 | | |
831 | 832 | | |
| |||
837 | 838 | | |
838 | 839 | | |
839 | 840 | | |
840 | | - | |
| 841 | + | |
| 842 | + | |
841 | 843 | | |
842 | 844 | | |
843 | 845 | | |
| |||
0 commit comments