From f20f61994775f70b1767b6584a402fc328f2e813 Mon Sep 17 00:00:00 2001 From: Noah Laptop Date: Tue, 28 Apr 2020 12:03:51 -0700 Subject: [PATCH] update mqtt example to workaround https://github.com/OPEnSLab-OSU/SSLClient/issues/9 --- examples/EthernetMQTT/EthernetMQTT.ino | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/examples/EthernetMQTT/EthernetMQTT.ino b/examples/EthernetMQTT/EthernetMQTT.ino index 5eab3fe..1cb8a4b 100644 --- a/examples/EthernetMQTT/EthernetMQTT.ino +++ b/examples/EthernetMQTT/EthernetMQTT.ino @@ -51,8 +51,12 @@ void reconnect() { Serial.println("connected"); // Once connected, publish an announcement... client.publish("outTopic","hello world"); + // This is a workaround to address https://github.com/OPEnSLab-OSU/SSLClient/issues/9 + ethClientSSL.flush(); // ... and resubscribe client.subscribe("inTopic"); + // This is a workaround to address https://github.com/OPEnSLab-OSU/SSLClient/issues/9 + ethClientSSL.flush(); } else { Serial.print("failed, rc="); Serial.print(client.state());