Skip to content

Commit

Permalink
fix: remove unnecessary loop in is_ready
Browse files Browse the repository at this point in the history
  • Loading branch information
pyoor committed Aug 30, 2023
1 parent 351a1f3 commit f4ed501
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions grizzly/services/webtransport/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,15 +64,7 @@ def url(self, _query):

async def is_ready(self):
"""Wait until the service is ready"""
while True:
try:
await asyncio.wait_for(
_connect_to_server("127.0.0.1", self.port), timeout=1.0
)
except asyncio.TimeoutError:
pass
else:
return
await _connect_to_server("127.0.0.1", self.port)

def start(self) -> None:
"""Start the server."""
Expand Down

0 comments on commit f4ed501

Please sign in to comment.