mirror of
https://github.com/apache/cloudstack.git
synced 2025-11-03 04:12:31 +01:00
agent: reconnect after waiting 5 seconds (#9258)
* agent: reconnect after waiting 5 seconds * Update agent/src/main/java/com/cloud/agent/Agent.java * Update agent/src/main/java/com/cloud/agent/Agent.java Co-authored-by: Suresh Kumar Anaparti <sureshkumar.anaparti@gmail.com>
This commit is contained in:
parent
f7f7013ed0
commit
52247c57bb
@ -1141,6 +1141,12 @@ public class Agent implements HandlerFactory, IAgentControl, AgentStatusUpdater
|
||||
s_logger.error("Error parsing task", e);
|
||||
}
|
||||
} else if (task.getType() == Task.Type.DISCONNECT) {
|
||||
try {
|
||||
// an issue has been found if reconnect immediately after disconnecting. please refer to https://github.com/apache/cloudstack/issues/8517
|
||||
// wait 5 seconds before reconnecting
|
||||
Thread.sleep(5000);
|
||||
} catch (InterruptedException e) {
|
||||
}
|
||||
reconnect(task.getLink());
|
||||
return;
|
||||
} else if (task.getType() == Task.Type.OTHER) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user