Continue, NOT RETURN! - fix the issue where no one can join at all:

This commit is contained in:
Li 2022-09-05 16:36:28 +12:00
parent 4b48db6b2a
commit 99c9221f4b
6 changed files with 21 additions and 19 deletions
HorseIsleServer
HISPd
Properties
Resources/DEBIAN
LibHISP
MPN00BS/Properties

View file

@ -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")]

View file

@ -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

View file

@ -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")]

View file

@ -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);

View file

@ -40,7 +40,7 @@ namespace HISP.Server
#elif OS_MACOS
return "MACOS";
#else
return "UNK_PLATFORM";
return "UNKNWON";
#endif
}

View file

@ -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")]