Commit d5a18e28 authored by Michael Ott's avatar Michael Ott
Browse files

Fix error retry in IPMIHost::sendRawCmd()

parent 54e70d27
......@@ -203,16 +203,16 @@ uint64_t IPMIHost::sendRawCmd(const std::vector<uint8_t>& rawCmd,
if ((len = ipmi_cmd_raw(_ipmiCtx, rawCmd[0], rawCmd[1], &rawCmd[2], rawCmd.size() - 2, buf, sizeof(buf))) < 0) {
if (retries == 0) {
LOG(error) << _hostName << ": ipmi_sensor_read " << ipmi_ctx_errormsg(_ipmiCtx);
}
increaseErrorCount();
disconnect();
try {
connect();
} catch (const std::runtime_error& e) {
increaseErrorCount();
disconnect();
try {
connect();
} catch (const std::runtime_error& e) {
increaseErrorCount();
}
} else {
break;
}
} else {
break;
}
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment