From 6e2f8e7483d36b02db40f4ee60487395f09e3b6d Mon Sep 17 00:00:00 2001
From: Li
Date: Fri, 11 Nov 2022 02:33:44 +1300
Subject: [PATCH] Build with .NET 7.0 release
---
.github/workflows/build.yml | 12 ++++++------
HorseIsleServer/LibHISP/Server/GameClient.cs | 4 ++--
2 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index df4994b..0bf58a2 100755
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -21,8 +21,8 @@ jobs:
- name: Setup .NET
uses: actions/setup-dotnet@v1
with:
- dotnet-version: 7.0.100-preview.5.22307.18
- include-prerelease: true
+ dotnet-version: 7.0
+ include-prerelease: false
- name: Install utils
run: |
sudo apt update
@@ -191,8 +191,8 @@ jobs:
- name: Setup .NET
uses: actions/setup-dotnet@v1
with:
- dotnet-version: 7.0.100-preview.5.22307.18
- include-prerelease: true
+ dotnet-version: 7.0
+ include-prerelease: false
- name: Install utils
run: dotnet tool install -g dotnet-script
@@ -315,8 +315,8 @@ jobs:
- name: Setup .NET
uses: actions/setup-dotnet@v1
with:
- dotnet-version: 7.0.100-preview.5.22307.18
- include-prerelease: true
+ dotnet-version: 7.0
+ include-prerelease: false
- name: Install utils
run: dotnet tool install -g dotnet-script
diff --git a/HorseIsleServer/LibHISP/Server/GameClient.cs b/HorseIsleServer/LibHISP/Server/GameClient.cs
index 2a3870c..75c7feb 100755
--- a/HorseIsleServer/LibHISP/Server/GameClient.cs
+++ b/HorseIsleServer/LibHISP/Server/GameClient.cs
@@ -122,7 +122,7 @@ namespace HISP.Server
{
try
{
- do
+ while (!GameServer.ServerSocket.AcceptAsync(e))
{
Socket eSocket = e.AcceptSocket;
@@ -137,7 +137,7 @@ namespace HISP.Server
if (GameServer.ServerSocket == null)
return;
- } while (!GameServer.ServerSocket.AcceptAsync(e));
+ }
}
catch (ObjectDisposedException ex) { Logger.ErrorPrint("Server shutdown due to " + ex.Message); } // server shutdown
}