diff --git a/server/ServerFramework.cpp b/server/ServerFramework.cpp index f41ca492839..fac53f62f75 100644 --- a/server/ServerFramework.cpp +++ b/server/ServerFramework.cpp @@ -107,7 +107,8 @@ auto PythonServer::InitModules() -> bool if (GetOptionsDB().Get("network.server.python.asyncio-interval") > 0) { py::object asyncio = py::import("asyncio"); - m_asyncio_event_loop = asyncio.attr("get_event_loop")(); + m_asyncio_event_loop = asyncio.attr("new_event_loop")(); + asyncio.attr("set_event_loop")(m_asyncio_event_loop); } DebugLogger() << "Server Python modules successfully initialized!";