Skip to content

Commit

Permalink
Merge branch 'master' into development/METROL-606
Browse files Browse the repository at this point in the history
  • Loading branch information
pwielders authored Sep 27, 2024
2 parents 8a92cd6 + aaf530c commit f6d0602
Showing 1 changed file with 15 additions and 13 deletions.
28 changes: 15 additions & 13 deletions Source/Thunder/PluginServer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -581,26 +581,28 @@ namespace PluginHost {

Lock();

if (_jsonrpc != nullptr) {
PluginHost::IShell::IConnectionServer::INotification* sink = nullptr;
_jsonrpc->Detach(sink);
if (sink != nullptr) {
Unregister(sink);
sink->Release();
}
if (currentState != IShell::state::ACTIVATION) {
SYSLOG(Logging::Shutdown, (_T("Deactivated plugin [%s]:[%s]"), className.c_str(), callSign.c_str()));

#ifdef THUNDER_RESTFULL_API
Notify(EMPTY_STRING, string(_T("{\"state\":\"deactivated\",\"reason\":\"")) + textReason.Data() + _T("\"}"));
#endif
Notify(_T("statechange"), string(_T("{\"state\":\"deactivated\",\"reason\":\"")) + textReason.Data() + _T("\"}"));
}

if (_external.Connector().empty() == false) {
_external.Close(0);
}

if (currentState != IShell::state::ACTIVATION) {
SYSLOG(Logging::Shutdown, (_T("Deactivated plugin [%s]:[%s]"), className.c_str(), callSign.c_str()));
if (_jsonrpc != nullptr) {
PluginHost::IShell::IConnectionServer::INotification* sink = nullptr;

#ifdef THUNDER_RESTFULL_API
Notify(EMPTY_STRING, string(_T("{\"state\":\"deactivated\",\"reason\":\"")) + textReason.Data() + _T("\"}"));
#endif
Notify(_T("statechange"), string(_T("{\"state\":\"deactivated\",\"reason\":\"")) + textReason.Data() + _T("\"}"));
_jsonrpc->Detach(sink);

if (sink != nullptr) {
Unregister(sink);
sink->Release();
}
}
}

Expand Down

0 comments on commit f6d0602

Please sign in to comment.