]> git.deb.at Git - rhonda/impostor.git/commitdiff
refactor:ConnectionTimeout
authoryukieiji <yuki31gakki97@yahoo.co.jp>
Fri, 19 May 2023 13:59:05 +0000 (22:59 +0900)
committerminiduikboot <mini@duikbo.at>
Tue, 23 May 2023 19:39:09 +0000 (21:39 +0200)
src/Impostor.Server/Constants.cs [deleted file]
src/Impostor.Server/Net/State/Game.State.cs

diff --git a/src/Impostor.Server/Constants.cs b/src/Impostor.Server/Constants.cs
deleted file mode 100644 (file)
index cc39ae4..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-namespace Impostor.Server
-{
-    internal static class Constants
-    {
-        public const int ConnectionTimeout = 2500;
-    }
-}
index 935880bbd05ad21eaffca7c0e66b0f295e796b8a..b8fcd2ed72acebfe370e3ff3fb1312e24d5beee5 100644 (file)
@@ -1,4 +1,4 @@
-using System.Linq;
+using System.Linq;
 using System.Threading.Tasks;
 using Impostor.Api;
 using Impostor.Api.Innersloth;
@@ -76,7 +76,7 @@ namespace Impostor.Server.Net.State
             // Player can refuse to be kicked and keep the connection open, check for this.
             _ = Task.Run(async () =>
             {
-                await Task.Delay(Constants.ConnectionTimeout);
+                await Task.Delay(_timeoutConfig.ConnectionTimeout);
 
                 if (player.Client.Connection.IsConnected && player.Client.Connection is HazelConnection hazel)
                 {