fix #4 gracefully shutdown all ExecutorServices
This commit is contained in:
@@ -65,8 +65,8 @@ public abstract class Connection {
|
||||
public void stopServer() throws InterruptedException {
|
||||
System.out.println("Stopping server ...");
|
||||
serverProcess.destroy();
|
||||
serverOutout.cancel(true);
|
||||
serverError.cancel(true);
|
||||
serverOutout.cancel(false);
|
||||
serverError.cancel(false);
|
||||
serverService.shutdown();
|
||||
serverService.awaitTermination(3000, TimeUnit.MILLISECONDS);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user