diff --git a/sanic/server.py b/sanic/server.py index 48c3827e..be9bc31c 100644 --- a/sanic/server.py +++ b/sanic/server.py @@ -297,8 +297,8 @@ def serve(host, port, request_handler, error_handler, before_start=None, :param protocol: Subclass of asyncio protocol class :return: Nothing """ - loop = async_loop.new_event_loop() - asyncio.set_event_loop(loop) + loop = asyncio.get_event_loop() + asyncio.set_event_loop_policy(async_loop.EventLoopPolicy()) if debug: loop.set_debug(debug)