From 911485d52e45a895a938f5dc62f3ed8e8fc031e5 Mon Sep 17 00:00:00 2001 From: Adam Hopkins Date: Sun, 18 Dec 2022 15:04:10 +0200 Subject: [PATCH] Fix Windows sock share (#2635) --- sanic/server/runners.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sanic/server/runners.py b/sanic/server/runners.py index 73df3baf..c7066742 100644 --- a/sanic/server/runners.py +++ b/sanic/server/runners.py @@ -200,7 +200,7 @@ def _serve_http_1( asyncio_server_kwargs = ( asyncio_server_kwargs if asyncio_server_kwargs else {} ) - if OS_IS_WINDOWS: + if OS_IS_WINDOWS and sock: pid = os.getpid() sock = sock.share(pid) sock = socket.fromshare(sock)