mirror of
https://github.com/WerWolv/ImHex.git
synced 2026-03-28 07:47:03 -05:00
fix: Only register event shutting down the network interface once
This commit is contained in:
@@ -22,9 +22,11 @@ namespace hex::plugin::builtin {
|
||||
|
||||
static wolv::net::SocketServer networkInterfaceServer(31337);
|
||||
|
||||
EventManager::subscribe<EventImHexClosing>([]{
|
||||
networkInterfaceServer.shutdown();
|
||||
});
|
||||
AT_FIRST_TIME {
|
||||
EventManager::subscribe<EventImHexClosing>([]{
|
||||
networkInterfaceServer.shutdown();
|
||||
});
|
||||
};
|
||||
|
||||
networkInterfaceServer.accept([](auto, const std::vector<u8> &data) -> std::vector<u8> {
|
||||
nlohmann::json result;
|
||||
|
||||
Reference in New Issue
Block a user