fix(cloud): only start WS Client if config.CloudToken is set (#27)

This commit is contained in:
Cameron Fleming
2025-02-11 13:51:18 +00:00
committed by GitHub
parent 8ffe66a1bc
commit a9767b650c
2 changed files with 10 additions and 1 deletions

View File

@@ -68,6 +68,11 @@ func handleCloudRegister(c *gin.Context) {
return
}
if config.CloudToken == "" {
logger.Info("Starting websocket client due to adoption")
go RunWebsocketClient()
}
config.CloudToken = tokenResp.SecretToken
config.CloudURL = req.CloudAPI