From eda40bf23256d70a8cceba1160270e0716a31528 Mon Sep 17 00:00:00 2001 From: Ery Lee Date: Wed, 14 Jan 2015 13:09:27 +0800 Subject: [PATCH] fix clientid --- apps/emqtt/src/emqtt_protocol.erl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/emqtt/src/emqtt_protocol.erl b/apps/emqtt/src/emqtt_protocol.erl index 451a73c27..b43e240ae 100644 --- a/apps/emqtt/src/emqtt_protocol.erl +++ b/apps/emqtt/src/emqtt_protocol.erl @@ -349,7 +349,7 @@ validate_protocol(#mqtt_packet_connect { proto_ver = Ver, proto_name = Name }) - lists:member({Ver, Name}, ?PROTOCOL_NAMES). validate_clientid(#mqtt_packet_connect { client_id = ClientId }) - when ( size(ClientId) >= 1 ) andalso ( size(ClientId) > ?MAX_CLIENTID_LEN ) -> + when ( size(ClientId) >= 1 ) andalso ( size(ClientId) =< ?MAX_CLIENTID_LEN ) -> true; %% MQTT3.1.1 allow null clientId.