Skip to content

Commit

Permalink
Merge pull request #144 from ovcharenko-di/fix/npe-sendmessagecommand
Browse files Browse the repository at this point in the history
fix npe
  • Loading branch information
nixel2007 authored May 28, 2023
2 parents a5fa549 + b9dffa4 commit 6911538
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/main/java/com/clouds42/Commands/SendMessageCommand.java
Original file line number Diff line number Diff line change
Expand Up @@ -74,13 +74,15 @@ public Integer call() throws Exception {
logger.info("Try: {}", i);
try {
result = pipeIn.readLine();
break;
if (result != null) {
break;
}
} catch (IOException e) {
logger.info("Can't read answer from main app...");
Thread.sleep(10);
}
}
if (result.equals(PipeMessages.OK_RESULT)) {
if (result != null && result.equals(PipeMessages.OK_RESULT)) {
logger.info("Command success: {}", commandText);
client.close();
return CommandLine.ExitCode.OK;
Expand Down

0 comments on commit 6911538

Please sign in to comment.