Skip to content

Commit bed108f

Browse files
authored
Fix aiohttp timeout settings (#986)
1 parent a43c13f commit bed108f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

api/src/serge/routers/model.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ async def download_model(model_name: str):
146146
model_path = os.path.join(WEIGHTS, f"{model_name}.bin")
147147

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

0 commit comments

Comments
 (0)