Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes #7592: remove the wait_for wrapper around await site.start() when starting HTTP REST API server #7617

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 1 addition & 4 deletions src/tribler/core/components/restapi/rest/rest_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -162,10 +162,7 @@ async def start_http_site(self):
self._logger.info(f"Starting HTTP REST API server on port {api_port}...")

try:
# The self.site.start() is expected to start immediately. It looks like on some machines, it hangs.
# The timeout is added to prevent the hypothetical hanging.
await asyncio.wait_for(self.site.start(), timeout=SITE_START_TIMEOUT)

await self.site.start()
except BaseException as e:
self._logger.exception(f"Can't start HTTP REST API on port {api_port}: {e.__class__.__name__}: {e}")
raise
Expand Down