diff --git a/sanic/server.py b/sanic/server.py index 8df37b50..2393d089 100644 --- a/sanic/server.py +++ b/sanic/server.py @@ -585,7 +585,7 @@ def serve( else: conn.close() - if sys.version_info.minor >= 8: + if sys.version_info < (3, 8): _shutdown = asyncio.gather(*coros, loop=loop) else: _shutdown = asyncio.gather(*coros)