From 8c3cd9be2aaa9df931df46de98d38ce1983a168b Mon Sep 17 00:00:00 2001 From: Nicolas Date: Sun, 10 Apr 2016 23:05:42 +0200 Subject: [PATCH] Fix #34 --- hbmqtt/mqtt/protocol/broker_handler.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/hbmqtt/mqtt/protocol/broker_handler.py b/hbmqtt/mqtt/protocol/broker_handler.py index f7b5a07..3f0935f 100644 --- a/hbmqtt/mqtt/protocol/broker_handler.py +++ b/hbmqtt/mqtt/protocol/broker_handler.py @@ -143,8 +143,7 @@ class BrokerProtocolHandler(ProtocolHandler): if connect.proto_level != 4: # only MQTT 3.1.1 supported error_msg = 'Invalid protocol from %s: %d' % \ - (format_client_message(address=remote_address, port=remote_port), - connect.variable_header.protocol_level) + (format_client_message(address=remote_address, port=remote_port), connect.proto_level) connack = ConnackPacket.build(0, UNACCEPTABLE_PROTOCOL_VERSION) # [MQTT-3.2.2-4] session_parent=0 elif connect.username_flag and connect.username is None: error_msg = 'Invalid username from %s' % \