List of usage examples for io.netty.util.concurrent Future sync
Future<V> sync() throws InterruptedException;
From source file:nz.co.fortytwo.signalk.server.NettyServer.java
License:Open Source License
public void shutdownServer() { logger.info("Stopping ptrans..."); Future<?> groupShutdownFuture = group.shutdownGracefully(); Future<?> workerGroupShutdownFuture = workerGroup.shutdownGracefully(); try {/*from ww w . j av a 2s.co m*/ groupShutdownFuture.sync(); } catch (InterruptedException ignored) { } try { workerGroupShutdownFuture.sync(); } catch (InterruptedException e) { e.printStackTrace(); } logger.info("Stopped"); }