Compare commits

...

1 Commits

Author SHA1 Message Date
Cedric Verstraeten
a2cebaf90b hot fix: wait for token in webrtc 2023-10-24 13:14:14 +02:00

View File

@@ -208,7 +208,9 @@ func InitializeWebRTCConnection(configuration *models.Configuration, communicati
}
payload, err := models.PackageMQTTMessage(configuration, message)
if err == nil {
mqttClient.Publish("kerberos/hub/"+hubKey, 0, false, payload)
log.Log.Info("InitializeWebRTCConnection:" + string(candateBinary))
token := mqttClient.Publish("kerberos/hub/"+hubKey, 0, false, payload)
token.Wait()
} else {
log.Log.Info("HandleRequestConfig: something went wrong while sending acknowledge config to hub: " + string(payload))
}
@@ -233,7 +235,8 @@ func InitializeWebRTCConnection(configuration *models.Configuration, communicati
}
payload, err := models.PackageMQTTMessage(configuration, message)
if err == nil {
mqttClient.Publish("kerberos/hub/"+hubKey, 0, false, payload)
token := mqttClient.Publish("kerberos/hub/"+hubKey, 0, false, payload)
token.Wait()
} else {
log.Log.Info("HandleRequestConfig: something went wrong while sending acknowledge config to hub: " + string(payload))
}