Closed tarzan115 closed 7 years ago
@tarzan115
The network connection is not handled by the library.
Library controls only MQTT
layer of the communication.
It uses only read
and write
methods from the MqttClient::Network
object that you need to provide.
The MqttClient
can detect the disconnection only whendisconnect
is called manually or something goes wrong:
connect
call is failedpublish
call is failedIn your case I see two options:
disconnect
manually when ESP8266 detected the TCP connection failurethank you so much for your answer. I had test only TCP, it disconnect every 30 senconds. I am checking my server.
thanks.
@tarzan115
I have found and fixed the issue with keepalive
implementation (See 1fd305fca857bf2dbbd1e4a85ecb2cdc2435954d).
Created the improvement ticket #2 to be able to provide network connection status to the library to detect TCP disconnect almost immediately.
thank you for this :D
I am using Arduino ESP8266 to connect Broker, but when client disconnect to Broker I check by code
mqtt->isConnected()
and it not realize disconnect even. I write my code by example and changebuffer
to550
andMessageHandlersImpl
to5
.thank you so much for your library.