/** * terminate this context */ @Override public synchronized void term() { clientScheduleService.stop(); for (Server conn : serverConnections) { conn.close(); } serverConnections = null; //we need to release resources associated with the worker event loop group workerEventLoopGroup.shutdownGracefully().awaitUninterruptibly(); } }