Fix build

This commit is contained in:
Li 2022-11-18 19:51:25 +13:00
parent 458748e6b0
commit 7fcaf412df
5 changed files with 21 additions and 27 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
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.8.45.0")]
[assembly: AssemblyFileVersion("1.8.45.0")]
[assembly: AssemblyVersion("1.8.46.0")]
[assembly: AssemblyFileVersion("1.8.46.0")]

View file

@ -1,5 +1,5 @@
Package: hisp
Version: 1.8.45
Version: 1.8.46
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.45.0")]
[assembly: AssemblyFileVersion("1.8.45.0")]
[assembly: AssemblyVersion("1.8.46.0")]
[assembly: AssemblyFileVersion("1.8.46.0")]

View file

@ -5,7 +5,6 @@ namespace HISP.Server.Network
{
public class Hybrid : Transport
{
Transport actualTransport = null;
@ -58,12 +57,8 @@ namespace HISP.Server.Network
public override void ProcessReceivedPackets(int available, byte[] buffer)
{
for (int i = 0; i < available; i++)
base.currentPacket.Add(buffer[i]);
if (currentPacket.Count >= 3)
{
if (ConfigReader.EnableWebSocket && WebSocket.IsStartOfHandshake(currentPacket.ToArray()))
if (ConfigReader.EnableWebSocket && WebSocket.IsStartOfHandshake(buffer))
{
Logger.InfoPrint(this.Ip + " Switching to WebSocket");
actualTransport = new WebSocket();
@ -82,7 +77,6 @@ namespace HISP.Server.Network
actualTransport.Accept(base.socket, base.onReceiveCallback, base.onDisconnectCallback);
}
}
}
internal override void receivePackets(object sender, SocketAsyncEventArgs e)
{

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.45.0")]
[assembly: AssemblyFileVersion("1.8.45.0")]
[assembly: AssemblyVersion("1.8.46.0")]
[assembly: AssemblyFileVersion("1.8.46.0")]