Use DecoderException. This is inline with what we do in other decoders

> Am 18.04.2014 um 22:16 schrieb Mousom Dhar Gupta <notifications@github.com>:
> 
> In codec-mqtt/src/main/java/io/netty/handler/codec/mqtt/MqttDecoder.java:
> 
> > +
> > +            case MessageType.PINGREQ:
> > +            case MessageType.PINGRESP:
> > +            case MessageType.DISCONNECT:
> > +                // Empty variable header
> > +                return new DecodeResult<Object>(null, 0);
> > +
> > +            default:
> > +                return new DecodeResult<Object>(null, 0);
> > +        }
> > +    }
> > +
> > +    private static DecodeResult<ConnectVariableHeader> decodeConnectionVariableHeader(ByteBuf buffer) {
> > +        final DecodeResult<String> protoString = decodeString(buffer);
> > +        if (!PROTOCOL_NAME.equals(protoString.value)) {
> > +            throw new IllegalArgumentException(PROTOCOL_NAME + " signature is missing. Closing channel.");
> I will throw a IllegalStateException. Is that OK?
> 
> —
> Reply to this email directly or view it on GitHub.