Fixed countdown

This commit is contained in:
nathan 2019-01-22 00:39:18 +01:00
parent 0eb19e8c3f
commit 463433ef45

View File

@ -374,10 +374,10 @@ class Server<C extends Connection> extends EndPointServer {
// now WAIT until bind has released the socket
// wait a max of 10 tries
int tries = 10;
while (tries-- >= 0 && isRunning(this.config)) {
while (tries-- > 0 && isRunning(this.config)) {
logger.warn("Server has requested shutdown, but the socket is still bound. Waiting {} more times", tries);
try {
Thread.sleep(1000);
Thread.sleep(2000);
} catch (InterruptedException ignored) {
}
}