Skip to content

Commit

Permalink
Fix use of deprecated asyncio.get_event_loop
Browse files Browse the repository at this point in the history
  • Loading branch information
o01eg committed Oct 19, 2024
1 parent 73a9991 commit 6a06310
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion server/ServerFramework.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,8 @@ auto PythonServer::InitModules() -> bool
if (GetOptionsDB().Get<int>("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!";
Expand Down

0 comments on commit 6a06310

Please sign in to comment.