From 99c9221f4b7f65a1940bc989b3fd605d2d1e704c Mon Sep 17 00:00:00 2001
From: Li
Date: Mon, 5 Sep 2022 16:36:28 +1200
Subject: [PATCH] Continue, NOT RETURN! - fix the issue where no one can join
at all:
---
.../HISPd/Properties/AssemblyInfo.cs | 4 ++--
.../HISPd/Resources/DEBIAN/control | 2 +-
.../LibHISP/Properties/AssemblyInfo.cs | 4 ++--
HorseIsleServer/LibHISP/Server/GameClient.cs | 24 ++++++++++---------
.../LibHISP/Server/ServerVersion.cs | 2 +-
.../MPN00BS/Properties/AssemblyInfo.cs | 4 ++--
6 files changed, 21 insertions(+), 19 deletions(-)
diff --git a/HorseIsleServer/HISPd/Properties/AssemblyInfo.cs b/HorseIsleServer/HISPd/Properties/AssemblyInfo.cs
index 6cf99d7..bb3cbf3 100755
--- a/HorseIsleServer/HISPd/Properties/AssemblyInfo.cs
+++ b/HorseIsleServer/HISPd/Properties/AssemblyInfo.cs
@@ -31,5 +31,5 @@ using System.Runtime.InteropServices;
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
-[assembly: AssemblyVersion("1.8.1.0")]
-[assembly: AssemblyFileVersion("1.8.1.0")]
+[assembly: AssemblyVersion("1.8.2.0")]
+[assembly: AssemblyFileVersion("1.8.2.0")]
diff --git a/HorseIsleServer/HISPd/Resources/DEBIAN/control b/HorseIsleServer/HISPd/Resources/DEBIAN/control
index 80fcc86..76e5411 100755
--- a/HorseIsleServer/HISPd/Resources/DEBIAN/control
+++ b/HorseIsleServer/HISPd/Resources/DEBIAN/control
@@ -1,5 +1,5 @@
Package: hisp
-Version: 1.8.1
+Version: 1.8.2
Depends: coreutils,systemd,mariadb-server,libsqlite3-dev,zlib1g-dev,libicu-dev,libkrb5-dev
Maintainer: Li
Homepage: https://islehorse.com
diff --git a/HorseIsleServer/LibHISP/Properties/AssemblyInfo.cs b/HorseIsleServer/LibHISP/Properties/AssemblyInfo.cs
index 5e11274..8acffe9 100755
--- a/HorseIsleServer/LibHISP/Properties/AssemblyInfo.cs
+++ b/HorseIsleServer/LibHISP/Properties/AssemblyInfo.cs
@@ -30,8 +30,8 @@ using System.Runtime.InteropServices;
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
-[assembly: AssemblyVersion("1.8.1.0")]
-[assembly: AssemblyFileVersion("1.8.1.0")]
+[assembly: AssemblyVersion("1.8.2.0")]
+[assembly: AssemblyFileVersion("1.8.2.0")]
diff --git a/HorseIsleServer/LibHISP/Server/GameClient.cs b/HorseIsleServer/LibHISP/Server/GameClient.cs
index 2c9c3b2..5dcc41e 100755
--- a/HorseIsleServer/LibHISP/Server/GameClient.cs
+++ b/HorseIsleServer/LibHISP/Server/GameClient.cs
@@ -67,13 +67,20 @@ namespace HISP.Server
clientSocket.ReceiveTimeout = 10 * 1000; // 10sec
ClientSocket = clientSocket;
- RemoteIp = clientSocket.RemoteEndPoint.ToString();
+ if(clientSocket.RemoteEndPoint != null)
+ {
- if (RemoteIp.Contains(":"))
- RemoteIp = RemoteIp.Substring(0, RemoteIp.IndexOf(":"));
+ RemoteIp = clientSocket.RemoteEndPoint.ToString();
- Logger.DebugPrint("Client connected @ " + RemoteIp);
+ if (RemoteIp.Contains(":"))
+ RemoteIp = RemoteIp.Substring(0, RemoteIp.IndexOf(":"));
+ Logger.DebugPrint("Client connected @ " + RemoteIp);
+ }
+ else
+ {
+ Logger.DebugPrint("Client connected @ (IP UNKNOWN) // How is this possible?");
+ }
kickTimer = new Timer(new TimerCallback(kickTimerTick), null, kickInterval, kickInterval);
warnTimer = new Timer(new TimerCallback(warnTimerTick), null, warnInterval, warnInterval);
minuteTimer = new Timer(new TimerCallback(minuteTimerTick), null, oneMinute, oneMinute);
@@ -118,10 +125,9 @@ namespace HISP.Server
{
Socket eSocket = e.AcceptSocket;
if (eSocket == null)
- return;
+ continue;
if (eSocket.RemoteEndPoint == null)
- return;
-
+ continue;
new GameClient(eSocket);
e.AcceptSocket = null;
@@ -395,10 +401,6 @@ namespace HISP.Server
if (totalMinutesElapsed % 15 == 0)
LoggedinUser.Tiredness--;
}
-
-
-
-
if (!isDisconnecting)
minuteTimer.Change(oneMinute, oneMinute);
diff --git a/HorseIsleServer/LibHISP/Server/ServerVersion.cs b/HorseIsleServer/LibHISP/Server/ServerVersion.cs
index 5efadbe..305affc 100755
--- a/HorseIsleServer/LibHISP/Server/ServerVersion.cs
+++ b/HorseIsleServer/LibHISP/Server/ServerVersion.cs
@@ -40,7 +40,7 @@ namespace HISP.Server
#elif OS_MACOS
return "MACOS";
#else
- return "UNK_PLATFORM";
+ return "UNKNWON";
#endif
}
diff --git a/HorseIsleServer/MPN00BS/Properties/AssemblyInfo.cs b/HorseIsleServer/MPN00BS/Properties/AssemblyInfo.cs
index 8d2dcac..d708641 100755
--- a/HorseIsleServer/MPN00BS/Properties/AssemblyInfo.cs
+++ b/HorseIsleServer/MPN00BS/Properties/AssemblyInfo.cs
@@ -30,8 +30,8 @@ using System.Runtime.InteropServices;
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
-[assembly: AssemblyVersion("1.8.1.0")]
-[assembly: AssemblyFileVersion("1.8.1.0")]
+[assembly: AssemblyVersion("1.8.2.0")]
+[assembly: AssemblyFileVersion("1.8.2.0")]