This commit is contained in:
2025-03-11 00:14:51 +07:00
parent 25385c0798
commit 512fa4fd9d
3 changed files with 44 additions and 12 deletions

View File

@@ -586,10 +586,13 @@ function sendReceiveMqttMsg(mqttInstance::mqttClientInstance_v2, receivechannel:
)::NamedTuple where {T<:Any}
timepass = nothing
attempts = 1
attempts = 0
while attempts <= maxattempt
attempts += 1
if attempts > 1
println("attempts $attempts ", @__FILE__, " ", @__LINE__)
println("\nsendReceiveMqttMsg() attempts $attempts ", @__FILE__, ":", @__LINE__, " $(Dates.now())")
pprintln(outgoingMsg)
println("--------------\n")
end
sendMqttMsg(mqttInstance, outgoingMsg)
@@ -616,8 +619,6 @@ function sendReceiveMqttMsg(mqttInstance::mqttClientInstance_v2, receivechannel:
end
sleep(1)
end
attempts += 1
end
return (success=false,