Skip to content

fix: exit connection cleanly on expected GoAway signal in bidi streaming (v1)#6264

Merged
wukath merged 1 commit into
v1from
cherry-pick-go-away-to-v1
Jul 6, 2026
Merged

fix: exit connection cleanly on expected GoAway signal in bidi streaming (v1)#6264
wukath merged 1 commit into
v1from
cherry-pick-go-away-to-v1

Conversation

@wukath

@wukath wukath commented Jul 1, 2026

Copy link
Copy Markdown
Collaborator

Porting commit 4d165ef to the v1 branch.

Receive the GoAway signal from the Gemini Live API, set a flag on the InvocationContext indicating reconnection is requested, and exit the receive generator cleanly instead of raising a ConnectionClosed exception. This avoids throwing expected session-recycling exceptions into custom client wrappers, which helps prevent false alarms in custom client log monitors.

Co-authored-by: Kathy Wu <wukathy@google.com>
PiperOrigin-RevId: 937586604
Change-Id: Ic8d85ecadfd50647c9349dcb4c1a4d53518a7621
@wukath wukath force-pushed the cherry-pick-go-away-to-v1 branch from 6f7db7f to 561b968 Compare July 1, 2026 18:17
@wukath wukath merged commit de2abdf into v1 Jul 6, 2026
16 of 18 checks passed
@wukath wukath deleted the cherry-pick-go-away-to-v1 branch July 6, 2026 17:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant