MQTT: update default broker URL for examples

The MQTT broker URL used as default in the examples has ceased operation. All examples and documention have been updated to point to the new domain mqtt.eclipse.org.
This also required an update of the python example test scripts to use TLS 1.2
This commit is contained in:
Marius Vikhammer
2019-09-27 09:35:26 +08:00
committed by Euripedes Rocha
parent 37e511bef1
commit 6cadfe519b

View File

@ -81,13 +81,12 @@ def test_single_config(dut, transport, qos, repeat, published):
try:
if transport in ["ws", "wss"]:
client = mqtt.Client(transport="websockets")
client.ws_set_options(path="/ws", headers=None)
else:
client = mqtt.Client()
client.on_connect = on_connect
client.on_message = on_message
if transport in ["ssl", "wss"]:
client.tls_set(None, None, None, cert_reqs=ssl.CERT_NONE, tls_version=ssl.PROTOCOL_TLSv1, ciphers=None)
client.tls_set(None, None, None, cert_reqs=ssl.CERT_NONE, tls_version=ssl.PROTOCOL_TLSv1_2, ciphers=None)
client.tls_insecure_set(True)
print("Connecting...")
client.connect(broker_host[transport], broker_port[transport], 60)