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

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 // You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below: // by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")] // [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.8.1.0")] [assembly: AssemblyVersion("1.8.2.0")]
[assembly: AssemblyFileVersion("1.8.1.0")] [assembly: AssemblyFileVersion("1.8.2.0")]

View file

@ -1,5 +1,5 @@
Package: hisp Package: hisp
Version: 1.8.1 Version: 1.8.2
Depends: coreutils,systemd,mariadb-server,libsqlite3-dev,zlib1g-dev,libicu-dev,libkrb5-dev Depends: coreutils,systemd,mariadb-server,libsqlite3-dev,zlib1g-dev,libicu-dev,libkrb5-dev
Maintainer: Li Maintainer: Li
Homepage: https://islehorse.com 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 // You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below: // by using the '*' as shown below:
[assembly: AssemblyVersion("1.8.1.0")] [assembly: AssemblyVersion("1.8.2.0")]
[assembly: AssemblyFileVersion("1.8.1.0")] [assembly: AssemblyFileVersion("1.8.2.0")]

View file

@ -67,13 +67,20 @@ namespace HISP.Server
clientSocket.ReceiveTimeout = 10 * 1000; // 10sec clientSocket.ReceiveTimeout = 10 * 1000; // 10sec
ClientSocket = clientSocket; ClientSocket = clientSocket;
RemoteIp = clientSocket.RemoteEndPoint.ToString(); if(clientSocket.RemoteEndPoint != null)
{
if (RemoteIp.Contains(":")) RemoteIp = clientSocket.RemoteEndPoint.ToString();
RemoteIp = RemoteIp.Substring(0, RemoteIp.IndexOf(":"));
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); kickTimer = new Timer(new TimerCallback(kickTimerTick), null, kickInterval, kickInterval);
warnTimer = new Timer(new TimerCallback(warnTimerTick), null, warnInterval, warnInterval); warnTimer = new Timer(new TimerCallback(warnTimerTick), null, warnInterval, warnInterval);
minuteTimer = new Timer(new TimerCallback(minuteTimerTick), null, oneMinute, oneMinute); minuteTimer = new Timer(new TimerCallback(minuteTimerTick), null, oneMinute, oneMinute);
@ -118,10 +125,9 @@ namespace HISP.Server
{ {
Socket eSocket = e.AcceptSocket; Socket eSocket = e.AcceptSocket;
if (eSocket == null) if (eSocket == null)
return; continue;
if (eSocket.RemoteEndPoint == null) if (eSocket.RemoteEndPoint == null)
return; continue;
new GameClient(eSocket); new GameClient(eSocket);
e.AcceptSocket = null; e.AcceptSocket = null;
@ -395,10 +401,6 @@ namespace HISP.Server
if (totalMinutesElapsed % 15 == 0) if (totalMinutesElapsed % 15 == 0)
LoggedinUser.Tiredness--; LoggedinUser.Tiredness--;
} }
if (!isDisconnecting) if (!isDisconnecting)
minuteTimer.Change(oneMinute, oneMinute); minuteTimer.Change(oneMinute, oneMinute);

View file

@ -40,7 +40,7 @@ namespace HISP.Server
#elif OS_MACOS #elif OS_MACOS
return "MACOS"; return "MACOS";
#else #else
return "UNK_PLATFORM"; return "UNKNWON";
#endif #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 // You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below: // by using the '*' as shown below:
[assembly: AssemblyVersion("1.8.1.0")] [assembly: AssemblyVersion("1.8.2.0")]
[assembly: AssemblyFileVersion("1.8.1.0")] [assembly: AssemblyFileVersion("1.8.2.0")]