Update HISP

This commit is contained in:
Li 2022-11-17 13:32:47 +13:00
parent d73cd92c52
commit 29e5ab8093
8 changed files with 31 additions and 23 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.41.0")] [assembly: AssemblyVersion("1.8.42.0")]
[assembly: AssemblyFileVersion("1.8.41.0")] [assembly: AssemblyFileVersion("1.8.42.0")]

View file

@ -1,5 +1,5 @@
Package: hisp Package: hisp
Version: 1.8.41 Version: 1.8.42
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.41.0")] [assembly: AssemblyVersion("1.8.42.0")]
[assembly: AssemblyFileVersion("1.8.41.0")] [assembly: AssemblyFileVersion("1.8.42.0")]

View file

@ -85,11 +85,6 @@ namespace HISP.Server
Logger.CrashPrint(crashMsg); Logger.CrashPrint(crashMsg);
try
{
GameServer.ShutdownServer();
}
catch (Exception) { };
} }

View file

@ -86,8 +86,16 @@ namespace HISP.Server.Network
internal override void receivePackets(object sender, SocketAsyncEventArgs e) internal override void receivePackets(object sender, SocketAsyncEventArgs e)
{ {
if (!base.checkForError(e)) try
ProcessReceivedPackets(e.BytesTransferred, e.Buffer); {
if (!base.checkForError(e))
ProcessReceivedPackets(e.BytesTransferred, e.Buffer);
}
catch (Exception ex)
{
Logger.ErrorPrint(ex.StackTrace);
try { this.Disconnect(); } catch (Exception) { };
};
} }
public override void Send(byte[] data) public override void Send(byte[] data)

View file

@ -36,15 +36,20 @@ namespace HISP.Server.Network
} }
internal virtual void receivePackets(object sender, SocketAsyncEventArgs e) internal virtual void receivePackets(object sender, SocketAsyncEventArgs e)
{ {
do try
{ {
if (!checkForError(e)) do
{
if (checkForError(e)) break;
ProcessReceivedPackets(e.BytesTransferred, e.Buffer); ProcessReceivedPackets(e.BytesTransferred, e.Buffer);
else if (checkForError(e)) break;
break;
} while (!socket.ReceiveAsync(e));
} while (!socket.ReceiveAsync(e)); }
catch (Exception ex) {
Logger.ErrorPrint(ex.StackTrace);
try { this.Disconnect(); } catch (Exception) { };
};
} }
@ -102,8 +107,8 @@ namespace HISP.Server.Network
socket = null; socket = null;
} }
catch (SocketException e) { } catch (SocketException) { }
catch (ObjectDisposedException e) { }; catch (ObjectDisposedException) { };
} }
onDisconnectCallback(); onDisconnectCallback();

View file

@ -350,7 +350,7 @@ namespace HISP.Server.Network
additionalLengthData = BitConverter.GetBytes(Convert.ToUInt16(toSend)).Reverse().ToArray(); additionalLengthData = BitConverter.GetBytes(Convert.ToUInt16(toSend)).Reverse().ToArray();
} }
else if(toSend < Int64.MaxValue) else if(Convert.ToInt64(toSend) < Int64.MaxValue)
{ {
maskAndLength |= WEBSOCKET_LENGTH_INT64; maskAndLength |= WEBSOCKET_LENGTH_INT64;
additionalLengthData = BitConverter.GetBytes(Convert.ToInt64(toSend)).Reverse().ToArray(); additionalLengthData = BitConverter.GetBytes(Convert.ToInt64(toSend)).Reverse().ToArray();

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.41.0")] [assembly: AssemblyVersion("1.8.42.0")]
[assembly: AssemblyFileVersion("1.8.41.0")] [assembly: AssemblyFileVersion("1.8.42.0")]