fix: Network interface not shutting down correctly

This commit is contained in:
WerWolv 2023-11-04 22:20:22 +01:00
parent fa5e32496c
commit 055e18058f
1 changed files with 5 additions and 0 deletions

View File

@ -21,6 +21,11 @@ namespace hex::plugin::builtin {
}
static wolv::net::SocketServer networkInterfaceServer(31337);
EventManager::subscribe<EventImHexClosing>([]{
networkInterfaceServer.shutdown();
});
networkInterfaceServer.accept([](auto, const std::vector<u8> &data) -> std::vector<u8> {
nlohmann::json result;