update server connection

This commit is contained in:
Anish Mukherjee 2022-11-10 18:45:14 +05:30 committed by Matthew R. Kasun
parent 56142f29e1
commit dfd5961c6c

View file

@ -237,6 +237,11 @@ func GetMessageQueueEndpoint() (string, bool) {
host = config.Config.Server.MQHOST
}
secure := strings.Contains(host, "wss") || strings.Contains(host, "ssl")
if secure {
host = "wss://" + host
} else {
host = "ws://" + host
}
return host + ":" + GetMQServerPort(), secure
}