Disable plugins before shutting down EventLoops (#2214)
Because disabling plugins also cancels any pending tasks, there will be no task accessing the eventLoops. Reimplementation of #1578, fixes #1403
This commit is contained in:
parent
db266a8484
commit
a1f9c2e7d4
@ -404,15 +404,6 @@ public class BungeeCord extends ProxyServer
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
getLogger().info( "Closing IO threads" );
|
|
||||||
eventLoops.shutdownGracefully();
|
|
||||||
try
|
|
||||||
{
|
|
||||||
eventLoops.awaitTermination( Long.MAX_VALUE, TimeUnit.NANOSECONDS );
|
|
||||||
} catch ( InterruptedException ex )
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
if ( reconnectHandler != null )
|
if ( reconnectHandler != null )
|
||||||
{
|
{
|
||||||
getLogger().info( "Saving reconnect locations" );
|
getLogger().info( "Saving reconnect locations" );
|
||||||
@ -441,6 +432,15 @@ public class BungeeCord extends ProxyServer
|
|||||||
plugin.getExecutorService().shutdownNow();
|
plugin.getExecutorService().shutdownNow();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
getLogger().info( "Closing IO threads" );
|
||||||
|
eventLoops.shutdownGracefully();
|
||||||
|
try
|
||||||
|
{
|
||||||
|
eventLoops.awaitTermination( Long.MAX_VALUE, TimeUnit.NANOSECONDS );
|
||||||
|
} catch ( InterruptedException ex )
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
getLogger().info( "Thank you and goodbye" );
|
getLogger().info( "Thank you and goodbye" );
|
||||||
// Need to close loggers after last message!
|
// Need to close loggers after last message!
|
||||||
for ( Handler handler : getLogger().getHandlers() )
|
for ( Handler handler : getLogger().getHandlers() )
|
||||||
|
Loading…
Reference in New Issue
Block a user