send commands to host which is UP and connecting

This commit is contained in:
anthony 2010-10-14 11:08:09 -07:00
parent 912437c043
commit 7115aa06bd
1 changed files with 2 additions and 1 deletions

View File

@ -1319,7 +1319,8 @@ public class AgentManagerImpl implements AgentManager, HandlerFactory {
public Answer easySend(final Long hostId, final Command cmd, int timeout) {
try {
Host h = _hostDao.findById(hostId);
if( !h.getStatus().equals(Status.Up) ) {
Status status = h.getStatus();
if( status.equals(Status.Up) || status.equals(Status.Connecting) ){
return null;
}
final Answer answer = send(hostId, cmd, timeout);