Improvements to connector shutdown code, attempted fix for Windows support.

This commit is contained in:
Thulinma 2015-04-16 13:18:52 +02:00
parent 2e052fa2a1
commit d120523bbb
2 changed files with 7 additions and 3 deletions

View file

@ -149,8 +149,12 @@ namespace Controller {
std::map<std::string, pid_t>::iterator it;
for (it = currentConnectors.begin(); it != currentConnectors.end(); it++){
if (!runningConns.count(it->first)){
Log("CONF", "Stopping connector " + it->first);
Util::Procs::Stop(it->second);
if (Util::Procs::isActive(it->second)){
Log("CONF", "Stopping connector " + it->first);
Util::Procs::Stop(it->second);
}
currentConnectors.erase(it);
it = currentConnectors.begin();
}
}