mirror of
https://github.com/ME1312/SubServers-2.git
synced 2024-11-25 03:35:26 +01:00
Put lock in a more strategic location
This commit is contained in:
parent
f90a54e636
commit
2beec3ae7a
@ -137,7 +137,6 @@ public class InternalSubServer extends SubServerImpl {
|
||||
}
|
||||
|
||||
private void run() {
|
||||
lock = false;
|
||||
allowrestart = true;
|
||||
started = false;
|
||||
try {
|
||||
@ -151,6 +150,7 @@ public class InternalSubServer extends SubServerImpl {
|
||||
Logger.get("SubServers").info("Now starting " + getName());
|
||||
logger.process = process;
|
||||
logger.start();
|
||||
lock = false;
|
||||
command = new BufferedWriter(new OutputStreamWriter(process.getOutputStream()));
|
||||
for (LoggedCommand command : history) if (process.isAlive()) {
|
||||
this.command.write(command.getCommand());
|
||||
@ -162,6 +162,7 @@ public class InternalSubServer extends SubServerImpl {
|
||||
} catch (IOException | InterruptedException e) {
|
||||
e.printStackTrace();
|
||||
allowrestart = false;
|
||||
lock = false;
|
||||
}
|
||||
|
||||
Logger.get("SubServers").info(getName() + " has stopped");
|
||||
|
Loading…
Reference in New Issue
Block a user