Closing all handlers on stop()
This commit is contained in:
parent
151344aaff
commit
f6e41c856c
@ -41,6 +41,7 @@ import java.util.UUID;
|
|||||||
import java.util.concurrent.TimeUnit;
|
import java.util.concurrent.TimeUnit;
|
||||||
import java.util.concurrent.locks.ReadWriteLock;
|
import java.util.concurrent.locks.ReadWriteLock;
|
||||||
import java.util.concurrent.locks.ReentrantReadWriteLock;
|
import java.util.concurrent.locks.ReentrantReadWriteLock;
|
||||||
|
import java.util.logging.Handler;
|
||||||
import java.util.logging.Level;
|
import java.util.logging.Level;
|
||||||
import java.util.logging.Logger;
|
import java.util.logging.Logger;
|
||||||
import jline.UnsupportedTerminal;
|
import jline.UnsupportedTerminal;
|
||||||
@ -360,6 +361,11 @@ public class BungeeCord extends ProxyServer
|
|||||||
|
|
||||||
scheduler.shutdown();
|
scheduler.shutdown();
|
||||||
getLogger().info( "Thank you and goodbye" );
|
getLogger().info( "Thank you and goodbye" );
|
||||||
|
// Need to close loggers after last message!
|
||||||
|
for ( Handler handler : getLogger().getHandlers() )
|
||||||
|
{
|
||||||
|
handler.close();
|
||||||
|
}
|
||||||
System.exit( 0 );
|
System.exit( 0 );
|
||||||
}
|
}
|
||||||
}.start();
|
}.start();
|
||||||
|
Loading…
Reference in New Issue
Block a user