Skip to content

Commit 717ce98

Browse files
committed
Merge release branch 4.19 to 4.20
* 4.19: extra null guard (#10264)
2 parents 33a37da + f652ad0 commit 717ce98

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

engine/orchestration/src/main/java/com/cloud/agent/manager/AgentManagerImpl.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -633,11 +633,11 @@ protected AgentAttache notifyMonitorsOfConnection(final AgentAttache attache, fi
633633
}
634634
} catch (final HypervisorVersionChangedException hvce) {
635635
handleDisconnectWithoutInvestigation(attache, Event.ShutdownRequested, true, true);
636-
throw new CloudRuntimeException("Unable to connect " + attache.getId(), hvce);
636+
throw new CloudRuntimeException("Unable to connect " + (attache == null ? "<unknown agent>" : attache.getId()), hvce);
637637
} catch (final Exception e) {
638638
logger.error("Monitor {} says there is an error in the connect process for {} due to {}", monitor.second().getClass().getSimpleName(), hostId, e.getMessage(), e);
639639
handleDisconnectWithoutInvestigation(attache, Event.AgentDisconnected, true, true);
640-
throw new CloudRuntimeException("Unable to connect " + attache.getId(), e);
640+
throw new CloudRuntimeException("Unable to connect " + (attache == null ? "<unknown agent>" : attache.getId()), e);
641641
}
642642
}
643643
}

0 commit comments

Comments
 (0)