private void sendPacket(final Channel channel, ByteBuf packet) {
        channel.writeAndFlush(packet).addListener(new GenericFutureListener<Future<? super Void>>() {
            @Override
            public void operationComplete(Future<? super Void> future) throws Exception {
                if (future.cause() != null)
                    handlePacketSendException(channel, future.cause());
            }
        });
    }