diff --git a/src/communication.jl b/src/communication.jl index 18acde8..31c6852 100644 --- a/src/communication.jl +++ b/src/communication.jl @@ -393,7 +393,7 @@ end ----- mqttInstanceDict::Dict{Symbol, Any} a dictionary contain mqtt instance. 1 per mqtt client. - interval::Integer + keepaliveCheckInterval::Integer time interval to check mqtt server in seconds Return\n @@ -629,6 +629,7 @@ function sendReceiveMqttMsg(mqttInstance::mqttClientInstance_v2, receivechannel: println("\n attempts $attempts/$maxattempt ", @__FILE__, ":", @__LINE__, " $(Dates.now())") pprintln(outgoingMsg) println(" attempts $attempts/$maxattempt ", @__FILE__, ":", @__LINE__, " $(Dates.now())\n") + checkMqttConnection!(mqttInstance, keepaliveCheckInterval=5) end attempts += 1 end