You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi,
i have a simple MQTT Client which publishes messages to a MQTT Broker using QoS1.
If the broker did not send the PUBACK or it got lost then i would think the WaitTimout function used with the token from Client.publish should run in a timeout ?
I used following code:
timer := time.NewTicker(1 * time.Second)
for t := range timer.C {
if initialized == 1 {
token := cli.Publish(topic, 1, false, t.String())
if( !token.WaitTimeout(5000) ) {
if( token.Error() != nil ) {
fmt.Println(token.Error())
} else {
mutex.Lock()
sent = sent + 1
mutex.Unlock()
}
} else {
fmt.Println("timeout ACK");
}
}
}
I have checked that the PUBACK from the Broker is missing by using a different Client written with the paho-mqtt3c library.
best regards
Markus
The text was updated successfully, but these errors were encountered:
Hi,
i have a simple MQTT Client which publishes messages to a MQTT Broker using QoS1.
If the broker did not send the PUBACK or it got lost then i would think the WaitTimout function used with the token from Client.publish should run in a timeout ?
I used following code:
I have checked that the PUBACK from the Broker is missing by using a different Client written with the paho-mqtt3c library.
best regards
Markus
The text was updated successfully, but these errors were encountered: