Skip to content

Delay for a reconnect #163

@russellgsystems

Description

@russellgsystems

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?

image

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions