Skip to content

Commit

Permalink
add time to be sure the channel is ready
Browse files Browse the repository at this point in the history
  • Loading branch information
SilverBzH committed Sep 30, 2024
1 parent c3dbc92 commit 9469c89
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions avatar/pandora_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@
import grpc.aio
import logging

import time

from avatar.metrics.interceptors import aio_interceptors
from avatar.metrics.interceptors import interceptors
from bumble import pandora as bumble_server
Expand Down Expand Up @@ -112,6 +114,8 @@ async def reset(self) -> None:
await self._aio.channel.close()
self._aio = None

time.sleep(2)

# This call might fail if the server is unavailable.
self._address = Address(
(await self.aio.host.ReadLocalAddress(wait_for_ready=True, timeout=15.0)).address
Expand Down

0 comments on commit 9469c89

Please sign in to comment.