关闭测试

back_recharge
zhangshanxue 2019-12-17 11:46:00 +08:00
parent 915f3ea59a
commit 96c02199d1
1 changed files with 3 additions and 2 deletions

View File

@ -136,8 +136,9 @@ public class NettyGameServer extends AbstractServer {
} catch (Throwable var2) {
LOGGER.error("close NettyChannel exception" + var2);
}
bossGroup.shutdownGracefully();
workerGroup.shutdownGracefully();
//等待关闭网络 或者异步停留10秒
bossGroup.shutdownGracefully().sync();
workerGroup.shutdownGracefully().sync();
} catch (Exception e) {
LOGGER.error("close exception", getLocalAddress());
}