MQTTnet
MQTTnet copied to clipboard
how to close auto reconnect function in MQTTnet3.0.11?
hi,
I want to close auto reconnect function in MQTTnet3.0.11, but the default reconnect time is 5 seconds. So how can I close this function?
You mean you warnt to disable that Feature?
You mean you warnt to disable that Feature?
Hi @chkr1011 ,
yes, I want to realize reconnect function by myself in the callback function of OnMqttClientDisconnected.
I added this in master branch. Please let me know if this works for you.
I added this in master branch. Please let me know if this works for you.
hi @chkr1011 ,
ok, thanks a lot. I will try that and reply, but I would like to use the release version. So does this new option for disabling auto reconnect will be released in the next release version?
Hi @chkr1011 ,
I setted WithoutAutoReconnect in MQTTnet3.0.13, but it failed when connect to server. Callback function did not work in OnMqttClientConnected OnMqttClientDisconnected and OnMqttClientConnectingFailed.
It blocked and did not has responded when the program started.
The program can connect to the server normally when remove WithoutAutoReconnect.
So could you pls help to look into this case. Thanks a lot.
Please test with the latest version 4 and reopen this ticket if the issue still happens.