I am experiencing an unexpected connection termination behavior when using the Google Live API.
After successfully establishing a connection and enabling the rendering/filtering pipeline, if no further actions or messages are sent (i.e., the connection remains idle), the connection is automatically closed after approximately 2–3 minutes. At that point, I receive an error/response indicating the connection has been terminated, and the client is disconnected.
Key observations:
-
I do not receive a GOAWAY or any advance notice indicating that the connection is about to be closed.
-
According to the documentation, the expected idle timeout appears to be around 10 minutes, but in practice the first disconnection consistently happens after ~2–3 minutes.
-
Because of this, I currently have to manually handle the disconnect event and explicitly re-establish the connection on the client side.
My questions are:
-
Is this early disconnection after 2–3 minutes of inactivity expected behavior?
-
If so, what is the intended keep-alive or heartbeat mechanism to prevent the connection from being closed?
-
Is there a reason this shorter idle timeout is not documented, or is it environment- or configuration-dependent?
Any clarification on the actual idle timeout policy and best practices for maintaining a persistent connection would be greatly appreciated.