private void SendPluginStopSignal(PluginInfo plugin)
{
lock (_pluginsSync)
{
if (!plugin.IsStarted)
return;
ReportEvent("Stop plugin: " + plugin.Name);
try
{
// send signal to close
var eventName = Const.GetStopEventName(plugin.Process.Id);
var stopEvent = EventWaitHandle.OpenExisting(eventName);
stopEvent.Set();
}
catch (WaitHandleCannotBeOpenedException)
{
}
catch (Exception exc)
{
Report(exc);
}
}
}