Skip to content

Commit

Permalink
Fix aiohttp timeout settings (#986)
Browse files Browse the repository at this point in the history
  • Loading branch information
gaby authored Dec 18, 2023
1 parent a43c13f commit bed108f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion api/src/serge/routers/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ async def download_model(model_name: str):
model_path = os.path.join(WEIGHTS, f"{model_name}.bin")

# Create an aiohttp session with timeout settings
timeout = aiohttp.ClientTimeout(total=300)
timeout = aiohttp.ClientTimeout(total=None, connect=300, sock_read=300)
async with aiohttp.ClientSession(timeout=timeout) as session:
# Start the download and add to active_downloads
download_task = asyncio.create_task(download_file(session, model_url, temp_model_path))
Expand Down

0 comments on commit bed108f

Please sign in to comment.