]> git.michaelhowe.org Git - packages/p/paho-mqtt.git/commitdiff
[451735] Revert default protocol to v3.1.
authorRoger A. Light <roger@atchoo.org>
Tue, 13 Jan 2015 00:36:37 +0000 (00:36 +0000)
committerRoger A. Light <roger@atchoo.org>
Tue, 13 Jan 2015 00:36:37 +0000 (00:36 +0000)
Bug: https://bugs.eclipse.org/bugs/show_bug.cgi?id=451735
Change-Id: I24a2e39c17b8b1cb52b38be53a0ef76c50a1c7eb

ChangeLog.txt
src/paho/mqtt/client.py
src/paho/mqtt/publish.py

index 462abf83c543d3e2f1b1ffc642b0d393793af281..b805fb4e0dd92dd605b35939b6f06ab8895a0b15 100644 (file)
@@ -2,6 +2,10 @@ v1.1 - 2015-01-30
 =================
 
 - Add support for wildcard certificates. Closes #440547.
+- Default connection behaviour has been reverted to MQTT v3.1 instead of
+  v3.1.1. There is as yet insufficient support for v3.1.1 to rely on, and
+  current v3.1 implementations do not return the correct CONNACK code to allow
+  detection of the fault. Closes #451735.
 
 
 v1.0.2 - 2014-09-13
index 096aec8076866ddc11af802a92ef8bf20c278fcf..ffb5022f42d011e43c23bd3a7fe5922ca3aa9c50 100755 (executable)
@@ -387,7 +387,7 @@ class Client(object):
       MQTT_LOG_ERR, and MQTT_LOG_DEBUG. The message itself is in buf.
 
     """
-    def __init__(self, client_id="", clean_session=True, userdata=None, protocol=MQTTv311):
+    def __init__(self, client_id="", clean_session=True, userdata=None, protocol=MQTTv31):
         """client_id is the unique client id string used when connecting to the
         broker. If client_id is zero length or None, then one will be randomly
         generated. In this case, clean_session must be True. If this is not the
@@ -408,7 +408,7 @@ class Client(object):
 
         The protocol argument allows explicit setting of the MQTT version to
         use for this client. Can be paho.mqtt.client.MQTTv311 (v3.1.1) or
-        paho.mqtt.client.MQTTv31 (v3.1), with the default being v3.1.1. If the
+        paho.mqtt.client.MQTTv31 (v3.1), with the default being v3.1. If the
         broker reports that the client connected with an invalid protocol
         version, the client will automatically attempt to reconnect using v3.1
         instead.
index 44056803e89620e582773f95a2a84bec9bc31d5a..b468dda82f15f005492a9dd75437c4dca7cb5917 100644 (file)
@@ -62,7 +62,7 @@ def _on_publish(c, userdata, mid):
 
 
 def multiple(msgs, hostname="localhost", port=1883, client_id="", keepalive=60,
-             will=None, auth=None, tls=None, protocol=mqtt.MQTTv311):
+             will=None, auth=None, tls=None, protocol=mqtt.MQTTv31):
     """Publish multiple messages to a broker, then disconnect cleanly.
 
     This function creates an MQTT client, connects to a broker and publishes a
@@ -172,7 +172,7 @@ def multiple(msgs, hostname="localhost", port=1883, client_id="", keepalive=60,
 
 def single(topic, payload=None, qos=0, retain=False, hostname="localhost",
            port=1883, client_id="", keepalive=60, will=None, auth=None,
-           tls=None, protocol=mqtt.MQTTv311):
+           tls=None, protocol=mqtt.MQTTv31):
     """Publish a single message to a broker, then disconnect cleanly.
 
     This function creates an MQTT client, connects to a broker and publishes a