Glad it helped. The standard seems vague on what is to happen if there is no keepalive set.
I agree that it's probably not something LwIP should change but something users need to be made aware of. So far there's an issue filed 6 days ago with Mosquitto but no response from Mosquitto developers. https://github.com/eclipse/mosquitto/issues/2309 On Thu, Sep 16, 2021, 12:06 AM Amr Elsayed <eng.amralsa...@gmail.com> wrote: > I read your message, before I was debugging the MQTT client and found I > spent a good time debugging a connection refused from Mosquitto, after > remembering your message and adding the keep-alive value, the problem got > solved. > Thanks, yes it might need reconsideration but I think as in LWIP things > need to be lightweight so only the minimum requirement of the standard > should be the default as also Mosquitto does not represent the standard as > far as I know. > > Best Regards, > Amr. > > On Wed, 15 Sept 2021 at 23:48, Luciano Moretti <luciano.more...@gmail.com> > wrote: > >> Found this issue today when we couldn't get our device to talk to a newly >> installed MQTT server: >> >> By default the LwIP MQTT Client sends a keepalive of 0 unless you set it >> yourself. Documentation in the header file says "0 to disable keep alive >> functionality" >> >> Mosquitto 2.0.12 now requires a non-zero keep alive value. >> >> Reading the MQTT specification it's not clear what should happen with a >> Keep Alive set to 0, stating "A Keep Alive value of zero (0) has the >> effect of turning off the keep alive mechanism. This means that, in this >> case, the Server is not required to disconnect the Client on the grounds of >> inactivity." It's not required to disconnect, but it doesn't say that it >> can't immediately disconnect either. >> >> Thought this might save some others some time. >> _______________________________________________ >> lwip-users mailing list >> lwip-users@nongnu.org >> https://lists.nongnu.org/mailman/listinfo/lwip-users > > _______________________________________________ > lwip-users mailing list > lwip-users@nongnu.org > https://lists.nongnu.org/mailman/listinfo/lwip-users
_______________________________________________ lwip-users mailing list lwip-users@nongnu.org https://lists.nongnu.org/mailman/listinfo/lwip-users