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
I am seeing an error 56 being returned from the MQTT Client Send Packet with our production code. I am not sure why the client is returning error 56. I tried to create a simple example to reproduce it, but the example didn't exhibit the problem after a hour of testing. I did get Warning 55102, "Client is already disconnected" though. Our production code doesn't currently check to see if the connection is still good and reconnect if not. I am looking at your example VI and noticed that you have a timeout on the event structure of 100 milliseconds. If the timeout occurs you check to see if the client is still connected if not then you have an elapsed time that waits for 5 seconds before trying to reconnect. Is there a specific reason you selected 5 seconds or is that arbitrary?
The reason I ask is that we have a client which sends a command and waits for a response. If it returns a timeout error. The timeout period is set to 5 seconds by default, but it can changed since it is just an input. You have your elapsed time set to auto reset so we might not have to wait the entire 5 seconds if it was reset previously so it might not be an issue. Since we already have some existing code that uses 5 seconds would you suggest that we increase the timeout in our code or would you suggest we decrease the elapsed time to less than 5 seconds?
The text was updated successfully, but these errors were encountered:
@russellgsystems the five seconds reconnection delay is arbitrary. I must say that there had not been a lot of testing for the default value of 100ms either, so it might be that your system has a longer latency, especially on a QoS=2. I'd start with a longer timeout.
Hello @francois-normandin
I am seeing an error 56 being returned from the MQTT Client Send Packet with our production code. I am not sure why the client is returning error 56. I tried to create a simple example to reproduce it, but the example didn't exhibit the problem after a hour of testing. I did get Warning 55102, "Client is already disconnected" though. Our production code doesn't currently check to see if the connection is still good and reconnect if not. I am looking at your example VI and noticed that you have a timeout on the event structure of 100 milliseconds. If the timeout occurs you check to see if the client is still connected if not then you have an elapsed time that waits for 5 seconds before trying to reconnect. Is there a specific reason you selected 5 seconds or is that arbitrary?
The reason I ask is that we have a client which sends a command and waits for a response. If it returns a timeout error. The timeout period is set to 5 seconds by default, but it can changed since it is just an input. You have your elapsed time set to auto reset so we might not have to wait the entire 5 seconds if it was reset previously so it might not be an issue. Since we already have some existing code that uses 5 seconds would you suggest that we increase the timeout in our code or would you suggest we decrease the elapsed time to less than 5 seconds?
The text was updated successfully, but these errors were encountered: