Fixed updateProtocol not restarting protocols with correct parameters.
Signed-off-by: Thulinma <jaron@vietors.com>
This commit is contained in:
parent
2b7b7e85ac
commit
a4baed35d2
1 changed files with 1 additions and 11 deletions
|
@ -27,18 +27,8 @@ namespace Controller {
|
|||
std::map<long long, std::string>::iterator iter;
|
||||
for (iter = currentConnectors.begin(); iter != currentConnectors.end(); iter++){
|
||||
if (iter->second.substr(0, protocol.size()) == protocol){
|
||||
Log("CONF", "Restarting connector for update: " + iter->second);
|
||||
Log("CONF", "Killing connector for update: " + iter->second);
|
||||
Util::Procs::Stop(toConn(iter->first));
|
||||
int i = 0;
|
||||
while (Util::Procs::isActive(toConn(iter->first)) && i < 30){
|
||||
Util::sleep(100);
|
||||
}
|
||||
if (i >= 30){
|
||||
Log("WARN", "Connector still active 3 seconds after shutdown - delaying restart.");
|
||||
}else{
|
||||
Util::Procs::Start(toConn(iter->first), Util::getMyPath() + iter->second);
|
||||
}
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue