From 3d4690cb0cbc0fce00e57d31c86da2005ce7bfc9 Mon Sep 17 00:00:00 2001 From: Patrick Nicolas Date: Sun, 18 Aug 2024 14:22:46 +0200 Subject: [PATCH] Cleanup socket on exit --- server/main.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/server/main.cpp b/server/main.cpp index eef2b3f4..1903454b 100644 --- a/server/main.cpp +++ b/server/main.cpp @@ -343,6 +343,15 @@ int inner_main(int argc, char * argv[], bool use_systemd) run_cleanup_functions(); } } +#ifdef WIVRN_USE_SYSTEMD + try + { + std::filesystem::remove(socket_path()); + } + catch (...) + { + } +#endif return EXIT_SUCCESS; }