Made LRM node properly use transport port from main config

This commit is contained in:
Derek S 2021-04-07 01:24:53 -05:00
parent d663b49367
commit 55ea8b4c77
2 changed files with 2 additions and 5 deletions

View file

@ -225,7 +225,7 @@ namespace LightReflectiveMirror
var uri = new Uri($"http://{conf.LoadBalancerAddress}:{conf.LoadBalancerPort}/api/auth");
string endpointPort = conf.EndpointPort.ToString();
string gamePort = "7777";
string gamePort = conf.TransportPort.ToString();
HttpWebRequest authReq = (HttpWebRequest)WebRequest.Create(uri);
authReq.Headers.Add("Authorization", conf.LoadBalancerAuthKey);

View file

@ -132,10 +132,7 @@ namespace LightReflectiveMirror
serverData = serverData,
clients = new List<int>(),
// hard coded for now REMEMBER TO UN-HARDCODE
// this is needed for load balancer to know which server this room
// belongs to
relayInfo = new RelayAddress { address = Program.publicIP, port = 7777, endpointPort = Program.conf.EndpointPort },
relayInfo = new RelayAddress { address = Program.publicIP, port = Program.conf.TransportPort, endpointPort = Program.conf.EndpointPort },
serverId = GetRandomServerID(),
hostIP = hostIP,