fix a deadlock or sporadic crash during shutdown
This commit is contained in:
@@ -20,7 +20,9 @@
|
||||
#include <aman/config/IdentifierFileFormat.h>
|
||||
|
||||
#include <protobuf/AircraftReport.pb.h>
|
||||
#include <zmq.h>
|
||||
|
||||
#include "com/ZmqContext.h"
|
||||
#include "PlugIn.h"
|
||||
|
||||
EXTERN_C IMAGE_DOS_HEADER __ImageBase;
|
||||
@@ -59,6 +61,8 @@ PlugIn::PlugIn() :
|
||||
return;
|
||||
}
|
||||
|
||||
ZmqContext::instance().initialize();
|
||||
|
||||
if (false == AircraftReporter::instance().initialize(this->m_configuration)) {
|
||||
this->DisplayUserMessage(PLUGIN_NAME, "ERROR", "Unable to initialize the reporter-connection to the backend", true, true, true, true, true);
|
||||
return;
|
||||
@@ -67,6 +71,7 @@ PlugIn::PlugIn() :
|
||||
|
||||
PlugIn::~PlugIn() noexcept {
|
||||
AircraftReporter::instance().deinitialize();
|
||||
ZmqContext::instance().deinitialize();
|
||||
google::protobuf::ShutdownProtobufLibrary();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user