Browse Source

clean up sockets after shutdown

master
Matthias Janke 5 years ago
parent
commit
22022b663c
1 changed files with 7 additions and 0 deletions
  1. 7
    0
      radangeld/main.cpp

+ 7
- 0
radangeld/main.cpp View File

@@ -25,6 +25,7 @@ with this program. If not, see <https://www.gnu.org/licenses/>
25 25
 #include <thread>
26 26
 #include <atomic>
27 27
 #include <csignal>
28
+#include <cstdio>
28 29
 
29 30
 #include <wchar.h>
30 31
 
@@ -539,6 +540,9 @@ void publish_events (zmqpp::context &zmqc)
539 540
 		}
540 541
 	}
541 542
 	while (true);
543
+
544
+	eventpublisher.close();
545
+	std::remove("radangel.events");
542 546
 }
543 547
 
544 548
 void publish_cpm (zmqpp::context &zmqc)
@@ -591,6 +595,9 @@ void publish_cpm (zmqpp::context &zmqc)
591 595
 		}
592 596
 	}
593 597
 	while (true);
598
+
599
+	cpmsocket.close();
600
+	std::remove("radangel.cpm");
594 601
 }
595 602
 
596 603
 int main (int argc, char *argv[])

Loading…
Cancel
Save