void myqtt_conn_opts_set_reconnect ( MyQttConnOpts opts,
axl_bool  enable_reconnect 
)

Allows to set/unset reconnect flag on the provided connection options object.

See also myqtt_conn_set_on_reconnect to get a notification when a reconnect operation takes place and finishes without error.

Parameters
optsThe connection options where the configuration is done.
enable_reconnectaxl_true to enable reconnect every time a connection is closed, axl_false to disable this mechanism.

SECURITY NOTE: keep in mind that using this option along with user/password at myqtt_conn_opts_set_auth will make the library to keep the password in memory. Otherwise, practical reconnection is not possible because that value (the password) is needed to successfully complete it.