knolleary / pubsubclient

A client library for the Arduino Ethernet Shield that provides support for MQTT.
http://pubsubclient.knolleary.net/
MIT License
3.82k stars 1.47k forks source link

ESP32 callback function (using WiFI) not responding since v2.0.0 #912

Open star297 opened 2 years ago

star297 commented 2 years ago

Callback works flawlessly on Arduino ESP32 v1.0.6 Update to v2.0.1 and I'm missing messages then eventually I get two or three messages come in. I call my WiFiMQTT.loop(); every second and process any incoming messages. Sending is working as normal. I did try v2.0.0 and had the same problem so went back to v1.0.6. I was hoping the problem had been fixed with v2.0.1 but its just the same.

Using a GSM modem (tinyGSM library) works normally, it's only a problem with the ESP32 WiFi. Someone mentioned a delay is needed somewhere but not sure where that would be implemented or why.

Any suggestions would be appreciated?