protected internal override void Stop0() { if (_channel == null) { return; } _debugLog.info(_serverName + ": stopping and unbinding from: " + _listenAddress); try { _channel.close().sync(); _channel = null; } catch (InterruptedException) { Thread.CurrentThread.Interrupt(); _debugLog.warn("Interrupted while closing channel."); } if (_workerGroup != null && _workerGroup.shutdownGracefully(2, 5, TimeUnit.SECONDS).awaitUninterruptibly(10, TimeUnit.SECONDS)) { _debugLog.warn("Worker group not shutdown within 10 seconds."); } _workerGroup = null; }
public override void Stop() { _bossGroup.shutdownGracefully(); _selectorGroup.shutdownGracefully(); }