MqttEncoder build failure

Motivation:
The MqttEncoder was failing to build because it was using a method that doesn't exist.

Modifications:
Change sessionPresent() to isSessionPresent().

Result:
MqttEnccoder is now able to build.
This commit is contained in:
Scott Mitchell 2015-07-30 10:19:17 -07:00
parent 7c31ab721a
commit a1f0785605

View File

@ -192,7 +192,7 @@ public class MqttEncoder extends MessageToMessageEncoder<MqttMessage> {
ByteBuf buf = byteBufAllocator.buffer(4);
buf.writeByte(getFixedHeaderByte1(message.fixedHeader()));
buf.writeByte(2);
buf.writeByte(message.variableHeader().sessionPresent() ? 0x01 : 0x00);
buf.writeByte(message.variableHeader().isSessionPresent() ? 0x01 : 0x00);
buf.writeByte(message.variableHeader().connectReturnCode().byteValue());
return buf;