This repository was archived by the owner on Apr 1, 2026. It is now read-only.
File tree Expand file tree Collapse file tree
google/cloud/bigtable/data Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -480,12 +480,8 @@ async def _manage_channel(
480480 old_channel = super_channel .swap_channel (new_channel )
481481 self ._invalidate_channel_stubs ()
482482 # give old_channel a chance to complete existing rpcs
483- if CrossSync .is_async :
484- await old_channel .close (grace_period )
485- else :
486- if grace_period :
487- self ._is_closed .wait (grace_period ) # type: ignore
488- old_channel .close () # type: ignore
483+ await CrossSync .event_wait (self ._is_closed , grace_period , async_break_early = False )
484+ await old_channel .close ()
489485 # subtract the time spent waiting for the channel to be replaced
490486 next_refresh = random .uniform (refresh_interval_min , refresh_interval_max )
491487 next_sleep = max (next_refresh - (time .monotonic () - start_timestamp ), 0 )
Original file line number Diff line number Diff line change @@ -363,8 +363,9 @@ def _manage_channel(
363363 self ._ping_and_warm_instances (channel = new_channel )
364364 old_channel = super_channel .swap_channel (new_channel )
365365 self ._invalidate_channel_stubs ()
366- if grace_period :
367- self ._is_closed .wait (grace_period )
366+ CrossSync ._Sync_Impl .event_wait (
367+ self ._is_closed , grace_period , async_break_early = False
368+ )
368369 old_channel .close ()
369370 next_refresh = random .uniform (refresh_interval_min , refresh_interval_max )
370371 next_sleep = max (next_refresh - (time .monotonic () - start_timestamp ), 0 )
You can’t perform that action at this time.
0 commit comments