question about stopping a process
Hello all, I have a Server class that allows connections on a certain port. I have a Connection class that handles input/etc. from the user once they are connected. I have it so that if a user types "shutdown" it will shutdown the Server. Here is the code for the main game loop. shutDown is a boolean, which is set to true when the user types "shutdown". My problem is that sometimes it takes more than 1 try before the server will actually shut down. Is there a way to force the gameLoop to check the status of shutDown when the Connection class is updated?
publicstaticvoid gameLoop()
{
while (!shutDown)
{
try{
new Connection(s, server.accept()).start();
}catch (IOException ioe){}
}
}

