arduino-libraries / ArduinoMqttClient

ArduinoMqttClient Library for Arduino
GNU Lesser General Public License v2.1
187 stars 73 forks source link

MKR 1500: failed connection error code 2 - mosquitto: socket error disconnecting #41

Open jackattack21 opened 4 years ago

jackattack21 commented 4 years ago

Running an MKR-15000 board that pushes data over MQTTS to 8883 mosquitto server. Half the time the board and server broker the initial connection just fine and everything runs perfectly. However, the other half of the time the connection gets hung up and is unable to connect to the server. The board will eventually return a code -2 and mosquitto will identify the new connection and then say there was a socket error - disconnecting.

Has anyone seen this issue before? i cant for the life of be understand why it only happens half the time. Is it an SSL issue? Msoquitto issue? Library issue?? -- why cant the function fail and retry? If i restart the arduino I typically get a connection but it would be better if it could retry on its own.