Skip to content

Commit

Permalink
Fixed bug where lock file would be deleted after a new process sends …
Browse files Browse the repository at this point in the history
…aris an ipc message
  • Loading branch information
cicchr committed Apr 6, 2018
1 parent dc2b3bb commit 33c217c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion libaris/res/edu/rpi/aris/VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.0.32
0.0.33
3 changes: 1 addition & 2 deletions server/src/edu/rpi/aris/Main.java
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,9 @@ public static void main(String[] args) throws IOException {
System.err.println(e.getMessage());
System.exit(1);
}
if (!tryLock()) {
if (ipcFile.exists() || !tryLock()) {
logger.info("Program already running");
logger.info("Sending message to running program");
//TODO
if (cmd.hasOption("add-user") && cmd.hasOption("password")) {
sendIpcMessage("add-user " + cmd.getOptionValue("add-user") + " " + cmd.getOptionValue("password"));
}
Expand Down

0 comments on commit 33c217c

Please sign in to comment.