Skip to content

Commit

Permalink
hot fix: wait for token in webrtc
Browse files Browse the repository at this point in the history
  • Loading branch information
cedricve committed Oct 24, 2023
1 parent 3f58f26 commit a2cebaf
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions machinery/src/webrtc/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -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))
}
Expand All @@ -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))
}
Expand Down

0 comments on commit a2cebaf

Please sign in to comment.