Skip to content

Commit 75130e8

Browse files
committed
fix tornado dev server
1 parent b0a9b06 commit 75130e8

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/idom/backend/tornado.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010

1111
from tornado.httpserver import HTTPServer
1212
from tornado.httputil import HTTPServerRequest
13+
from tornado.ioloop import IOLoop
1314
from tornado.log import enable_pretty_logging
1415
from tornado.platform.asyncio import AsyncIOMainLoop
1516
from tornado.web import Application, RequestHandler, StaticFileHandler
@@ -67,6 +68,9 @@ async def serve_development_app(
6768
) -> None:
6869
enable_pretty_logging()
6970

71+
# There might be a prior loop installed in a prior test case
72+
IOLoop.clear_current()
73+
7074
# setup up tornado to use asyncio
7175
AsyncIOMainLoop().install()
7276

0 commit comments

Comments
 (0)