From 09d6452475dc05ac640cd754d60007f105a18065 Mon Sep 17 00:00:00 2001 From: Yun Xu Date: Mon, 15 Jan 2018 15:15:08 -0800 Subject: [PATCH] fixed unit test --- sanic/server.py | 2 -- tests/test_multiprocessing.py | 1 - 2 files changed, 3 deletions(-) diff --git a/sanic/server.py b/sanic/server.py index 5855224b..2f2df444 100644 --- a/sanic/server.py +++ b/sanic/server.py @@ -549,8 +549,6 @@ def serve(host, port, request_handler, error_handler, before_start=None, """ if not run_async: # create new event_loop after fork - asyncio.get_event_loop().close() - loop = asyncio.new_event_loop() asyncio.set_event_loop(loop) diff --git a/tests/test_multiprocessing.py b/tests/test_multiprocessing.py index 519ad171..cdbd91a8 100644 --- a/tests/test_multiprocessing.py +++ b/tests/test_multiprocessing.py @@ -23,4 +23,3 @@ def test_multiprocessing(): app.run(HOST, app.test_port, workers=num_workers) assert len(process_list) == num_workers -