mirror of https://github.com/apache/cloudstack.git
bug 7295: seems like one agent attache is removed twice
status 7295: resolved fixed
This commit is contained in:
parent
7746257f79
commit
d5b04dd25a
|
|
@ -759,11 +759,14 @@ public class AgentManagerImpl implements AgentManager, HandlerFactory {
|
|||
return;
|
||||
}
|
||||
long hostId = attache.getId();
|
||||
if (s_logger.isDebugEnabled()) {
|
||||
s_logger.debug("remove Agent : " + hostId);
|
||||
}
|
||||
AgentAttache removed = null;
|
||||
boolean conflict = false;
|
||||
synchronized (_agents) {
|
||||
removed = _agents.remove(hostId);
|
||||
if( removed != attache ){
|
||||
removed = _agents.remove(hostId);
|
||||
if( removed != null && removed != attache ){
|
||||
conflict = true;
|
||||
_agents.put(hostId, removed);
|
||||
removed = attache;
|
||||
|
|
|
|||
Loading…
Reference in New Issue