Skip to content

Commit

Permalink
Avoid returning error when node is already stopped
Browse files Browse the repository at this point in the history
  • Loading branch information
desyncr committed Jul 13, 2020
1 parent 98ac3f2 commit 2dcf7d9
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,8 @@ public synchronized int start(String[] args) {
*/
public synchronized int stop() {
if (!isStarted()) {
return -1;
// Already stopped
return 0;
}

try {
Expand All @@ -79,7 +80,7 @@ public synchronized int stop() {
// Node was already stopped
} catch (Exception e) {
return -2;
}finally {
} finally {
isRunning = false;
}

Expand Down

0 comments on commit 2dcf7d9

Please sign in to comment.