You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We have a use case where we want to reuse the MqttClient object between connects to avoid destroying semaphores that may be accessed by other FreeRTOS tasks. However, it seems like the client keeps internal states that would be cleared by memset during MqttClient_Init.
Q: Is the library supposed to support client reuse or are you supposed to initialize a new one on connect?
Q: Would you be interested in a MqttClient_Reset PR that handles all the internal clearing?
The text was updated successfully, but these errors were encountered:
Q: Is the library supposed to support client reuse or are you supposed to initialize a new one on connect?
Yes, the library currently expects a fresh client structure prior to calling connect.
Q: Would you be interested in a MqttClient_Reset PR that handles all the internal clearing?
Certainly! That is a use case we had not considered. In order to accept any code changes, you will need to be an approved contributor. You can start this process by emailing support@wolfssl.com and referencing this issue. Otherwise, you can open feature request for this functionality by emailing the same address.
Alrighty, I can start having a look while I wait for the process.
The base case will be trivial but I expect to fail spectacularly on the v5 and SN parts as I'm not familiar with those areas of the library, nor am I sure how I'll test it with those features.
We have a use case where we want to reuse the
MqttClient
object between connects to avoid destroying semaphores that may be accessed by other FreeRTOS tasks. However, it seems like the client keeps internal states that would be cleared bymemset
duringMqttClient_Init
.Q: Is the library supposed to support client reuse or are you supposed to initialize a new one on connect?
Q: Would you be interested in a
MqttClient_Reset
PR that handles all the internal clearing?The text was updated successfully, but these errors were encountered: