Skip to content
This repository was archived by the owner on Jun 5, 2025. It is now read-only.

Commit a24f66b

Browse files
committed
start_serving should be False
According to the docs: start_serving set to True (default) causes the created server to start accepting connections immediately. When set to False, the user should await Server.start_serving() or Server.serve_forever() to make the server to start accepting connections. We call `await server.serve_forever()` in `run_proxy_server` so we should allow this command to ditact we are able to accept connections
1 parent c3eff9c commit a24f66b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/codegate/providers/copilot/provider.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -388,7 +388,7 @@ async def create_proxy_server(
388388
"""Create and start proxy server"""
389389
loop = asyncio.get_event_loop()
390390
server = await loop.create_server(
391-
lambda: cls(loop), host, port, ssl=ssl_context, reuse_port=True, start_serving=True
391+
lambda: cls(loop), host, port, ssl=ssl_context, reuse_port=True, start_serving=False
392392
)
393393
logger.debug(f"Proxy server running on {host}:{port}")
394394
return server

0 commit comments

Comments
 (0)