#8 wrap Shell in a dedicated Thread

This commit is contained in:
Rasha Djurdjevic 2021-01-06 16:39:11 +01:00
parent c86aaccfba
commit 95c2d445a7

View File

@ -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