fix a deadlock or sporadic crash during shutdown

This commit is contained in:
Sven Czarnian committed 2021-08-19 08:01:22 +02:00
1 parent 25c6a1fa86
commit d06ec49b2e
5 files changed
+57 -19

No files matched your search

+2 -3
View File
@@ -21,15 +21,14 @@ namespace aman {
*/
class AircraftReporter {
private:
bool m_initialized;
zmq::socket_t m_socket;
std::unique_ptr<zmq::socket_t> m_socket;
AircraftReporter() noexcept;
template <typename T>
bool setSocketKey(const std::string& key, T entry) {
try {
this->m_socket.set(entry, key);
this->m_socket->set(entry, key);
return true;
}
catch (std::exception&) {