#8 wrap Shell in a dedicated Thread
This commit is contained in:
@@ -26,6 +26,7 @@ public class Nameserver implements INameserver {
|
||||
private NameServerRemote nameServerLocal;
|
||||
|
||||
private Shell shell;
|
||||
private Thread shellThread;
|
||||
|
||||
/**
|
||||
* Creates a new server instance.
|
||||
@@ -80,11 +81,12 @@ public class Nameserver implements INameserver {
|
||||
this.shutdown();
|
||||
throw new StopShellException();
|
||||
})));
|
||||
shellThread = new Thread(shell);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void run() {
|
||||
shell.run();
|
||||
shellThread.start();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user