public void eventSunk(final ChannelPipeline pipeline, final ChannelEvent e)
throws Exception {
final NioDatagramChannel channel = (NioDatagramChannel) e.getChannel();
final ChannelFuture future = e.getFuture();
if (e instanceof ChannelStateEvent) {
final ChannelStateEvent stateEvent = (ChannelStateEvent) e;
final ChannelState state = stateEvent.getState();
final Object value = stateEvent.getValue();
switch (state) {
case OPEN:
if (Boolean.FALSE.equals(value)) {
channel.worker.close(channel, future);
}