This is to prevent segfaults for when there are a lot of waiting bytes coming in.
If this becomes an issue in Godot, you can call the drain() function that comes with this patch as well.
Found this issue when I set up a pause screen that also paused reading serial input. Waiting bytes accumulated, which led to a read error when processing was resumed.
This is to prevent segfaults for when there are a lot of waiting bytes coming in.
If this becomes an issue in Godot, you can call the
drain()
function that comes with this patch as well.Found this issue when I set up a pause screen that also paused reading serial input. Waiting bytes accumulated, which led to a read error when processing was resumed.