public void stop() { foreach (var ukcp in _channelManager.getAll()) { ukcp.notifyCloseEvent(); } _executorPool?.stop(false); if (_eventLoopGroup != null && !_eventLoopGroup.IsShuttingDown) { Task.Run(() => _eventLoopGroup?.ShutdownGracefullyAsync()); } }
/** * 同步关闭服务器 */ public void stop() { foreach (var channel in _localAddress) { channel.CloseAsync().Wait(); } foreach (var ukcp in _channelManager.getAll()) { ukcp.notifyCloseEvent(); } _eventLoopGroup?.ShutdownGracefullyAsync(); _executorPool?.stop(false); }
public void stop() { foreach (var ukcp in _channelManager.getAll()) { ukcp.close(); } _executorPool?.stop(false); if (_eventLoopGroup != null && !_eventLoopGroup.IsShuttingDown) { _eventLoopGroup?.ShutdownGracefullyAsync().Wait(); } _scheduleThread.stop(); }
/** * 同步关闭服务器 */ public void stop() { foreach (var channel in _localAddress) { //channel.CloseAsync().Wait(); Task.Run(() => channel.CloseAsync()).Wait(); } foreach (var ukcp in _channelManager.getAll()) { ukcp.close(); } _eventLoopGroup?.ShutdownGracefullyAsync(); _executorPool?.stop(false); _scheduleThread.stop(); }
/** * 同步关闭服务器 */ public async Task stop() { foreach (var channel in _localAddress) { //channel.CloseAsync().Wait(); await channel.CloseAsync(); } foreach (var ukcp in _channelManager.getAll()) { ukcp.close(); } if (_eventLoopGroup != null) { await _eventLoopGroup.ShutdownGracefullyAsync(); } _executorPool?.stop(false); _scheduleThread.stop(); }