Skip to content

Commit

Permalink
Log as info exceptions from server after sending stop with StopMojo. (#…
Browse files Browse the repository at this point in the history
…9188)

* Log as info exceptions from server after sending stop with StopMojo.
  • Loading branch information
janbartel committed Jan 25, 2023
1 parent 4993291 commit d46f6f7
Showing 1 changed file with 13 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -220,9 +220,19 @@ private String send(String command, int wait)
}
else
{
//Wait only a small amount of time to ensure TCP has sent the message
s.setSoTimeout(1000);
s.getInputStream().read();
try
{
//Wait only a small amount of time to ensure TCP has sent the message
s.setSoTimeout(1000);
s.getInputStream().read();
}
catch (Exception e)
{
if (getLog().isDebugEnabled())
getLog().error("Error after sending command: " + command + ". Check the server state.", e);
else
getLog().info(e.getMessage() + " after sending command: " + command + ". Check the server state.");
}
}

return response;
Expand Down

0 comments on commit d46f6f7

Please sign in to comment.