Skip to content

Commit

Permalink
Move exit check to loop
Browse files Browse the repository at this point in the history
  • Loading branch information
bmalinowsky committed Aug 17, 2024
1 parent 1f37bc2 commit 79c56a9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/io/calimero/tools/ProcComm.java
Original file line number Diff line number Diff line change
Expand Up @@ -391,8 +391,6 @@ public void quit()
*/
protected void issueCommand(final String line) throws KNXException, InterruptedException {
final String[] s = line.trim().split(" +");
if (s.length == 1 && "exit".equalsIgnoreCase(s[0]))
return;
if (s.length == 1 && ("?".equals(s[0]) || "help".equals(s[0])))
out(listCommandsAndDptAliases(new StringJoiner(System.lineSeparator()), false));
if (s.length > 1) {
Expand Down Expand Up @@ -810,6 +808,8 @@ private void runMonitorLoop() throws IOException, InterruptedException
final String line = in.readLine();
if (line == null)
continue;
if ("exit".equalsIgnoreCase(line))
return;
try {
issueCommand(line);
}
Expand Down

0 comments on commit 79c56a9

Please sign in to comment.