update
This commit is contained in:
@@ -186,11 +186,14 @@ function mqttClientInstance_v2(
|
||||
if clearOldMsg
|
||||
chnames = keys(msgReceiveChannel)
|
||||
for i in chnames
|
||||
totalmsg = msgReceiveChannel[i].n_avail_items #[TESTING]
|
||||
if totalmsg > 0
|
||||
while isready(msgReceiveChannel[i])
|
||||
_ = take!(msgReceiveChannel[i])
|
||||
end
|
||||
println("Total $totalmsg old MQTT messages cleared", @__FILE__, ":", @__LINE__, " $(Dates.now())")
|
||||
end
|
||||
end
|
||||
println("Old MQTT messages cleared")
|
||||
end
|
||||
|
||||
return instance
|
||||
|
||||
Reference in New Issue
Block a user