From 71d1ba4c61c2cbe4c8b462b56ed5930c68695676 Mon Sep 17 00:00:00 2001 From: Derek S <44935661+Derek-R-S@users.noreply.github.com> Date: Mon, 19 Apr 2021 21:33:54 -0500 Subject: [PATCH] Update Program.cs --- ServerProject-DONT-IMPORT-INTO-UNITY/LRM/Program/Program.cs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/ServerProject-DONT-IMPORT-INTO-UNITY/LRM/Program/Program.cs b/ServerProject-DONT-IMPORT-INTO-UNITY/LRM/Program/Program.cs index b640ffe..e6f028b 100644 --- a/ServerProject-DONT-IMPORT-INTO-UNITY/LRM/Program/Program.cs +++ b/ServerProject-DONT-IMPORT-INTO-UNITY/LRM/Program/Program.cs @@ -124,8 +124,10 @@ namespace LightReflectiveMirror { try { - webClient.Headers.Add("Authorization", conf.LoadBalancerAuthKey); - await webClient.DownloadStringTaskAsync($"http://{conf.LoadBalancerAddress}:{conf.LoadBalancerPort}/api/roomsupdated"); + using(WebClient wc = new WebClient()){ + wc.Headers.Add("Authorization", conf.LoadBalancerAuthKey); + await wc.DownloadStringTaskAsync($"http://{conf.LoadBalancerAddress}:{conf.LoadBalancerPort}/api/roomsupdated"); + } } catch { } // LLB might be down, ignore. }