Skip to content

Commit 03b3f8d

Browse files
authored
[MessageControl] Fix a shutdown issue (#361)
* Make sure that the Cleanups vector won't get destroyed before the Observer * Add the Cleanups vector to the constructor for consistency
1 parent 5c1e00f commit 03b3f8d

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

MessageControl/MessageControl.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ namespace Thunder {
6868
, _outputDirector()
6969
, _webSocketExporter()
7070
, _callback(nullptr)
71+
, _cleaning()
7172
, _observer(*this)
7273
, _service(nullptr)
7374
, _dispatcherIdentifier(Messaging::MessageUnit::Instance().Identifier())

MessageControl/MessageControl.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -464,6 +464,7 @@ namespace Plugin {
464464
OutputList _outputDirector;
465465
Publishers::WebSocketOutput _webSocketExporter;
466466
MessageControl::ICollect::ICallback* _callback;
467+
Cleanups _cleaning;
467468
Core::SinkType<Observer> _observer;
468469
PluginHost::IShell* _service;
469470
const string _dispatcherIdentifier;
@@ -475,7 +476,6 @@ namespace Plugin {
475476
Messaging::TraceFactoryType<Core::Messaging::IStore::WarningReporting, Core::Messaging::TextMessage> _warningReportingFactory;
476477
Messaging::TraceFactoryType<Core::Messaging::IStore::OperationalStream, Core::Messaging::TextMessage> _operationalStreamFactory;
477478
Messaging::TraceFactoryType<Core::Messaging::IStore::Assert, Core::Messaging::TextMessage> _assertFactory;
478-
Cleanups _cleaning;
479479
};
480480

481481
} // namespace Plugin

0 commit comments

Comments
 (0)