After a reconnect, _ready_for_realtime_input was never set back to True because _create_initial_response (which sets the flag) is only called on initial connection. This caused all audio/video/text to be silently dropped after reconnecting, making the bot appear to hang. Set the flag in _handle_session_ready when we detect a reconnect, either via session_resumption_handle (server restores state) or via existing context (rare case where connection drops before first resumption handle).
215 B
215 B
- Fixed Gemini Live bot hanging after a session resumption reconnect. Audio, video, and text input were silently dropped after reconnecting because the internal
_ready_for_realtime_inputflag was not being reset.