Skip to content

Commit

Permalink
Enabled unit tests for .net 4.5 and reduced errors on disconnecting
Browse files Browse the repository at this point in the history
  • Loading branch information
Jarno458 committed Jun 11, 2023
1 parent ebcbdab commit c1f4b94
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 8 deletions.
7 changes: 5 additions & 2 deletions .github/workflows/dotnet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ name: Build Solution

on:
push:
branches: [ main, V4_development ]
branches: [ main ]
pull_request:
branches: [ main, V4_development ]
branches: [ main ]

jobs:
build:
Expand Down Expand Up @@ -36,6 +36,9 @@ jobs:
- name: Run Tests (.net 4.0)
run: dotnet test Archipelago.MultiClient.Net.Tests/bin/Release/net472/Archipelago.MultiClient.Net.Tests.dll -l "trx;LogFileName=TestResults_net40.trx"

- name: Run Tests (.net 4.5)
run: dotnet test Archipelago.MultiClient.Net.Tests/bin/Release/net47/Archipelago.MultiClient.Net.Tests.dll -l "trx;LogFileName=TestResults_net45.trx"

- name: Run Tests (.net standard 2.0)
run: dotnet test Archipelago.MultiClient.Net.Tests/bin/Release/net48/Archipelago.MultiClient.Net.Tests.dll -l "trx;LogFileName=TestResults_standard20.trx"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@
<PackageReadmeFile>README.md</PackageReadmeFile>
<RepositoryUrl>https://github.com/ArchipelagoMW/Archipelago.MultiClient.Net</RepositoryUrl>
<RepositoryType>git</RepositoryType>
<AssemblyVersion>5.0.4.0</AssemblyVersion>
<FileVersion>5.0.4.0</FileVersion>
<Version>5.0.4</Version>
<AssemblyVersion>5.0.5.0</AssemblyVersion>
<FileVersion>5.0.5.0</FileVersion>
<Version>5.0.5</Version>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<PackageRequireLicenseAcceptance>False</PackageRequireLicenseAcceptance>
<PackageIcon>blue-icon.png</PackageIcon>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -144,9 +144,15 @@ async Task<string> ReadMessageAsync(byte[] buffer)

if (result.MessageType == WebSocketMessageType.Close)
{
await webSocket.CloseAsync(WebSocketCloseStatus.NormalClosure, string.Empty, CancellationToken.None);

OnSocketClosed();
try
{
await webSocket.CloseAsync(WebSocketCloseStatus.NormalClosure, string.Empty, CancellationToken.None);
}
catch
{
}

OnSocketClosed();
}
else
{
Expand Down

0 comments on commit c1f4b94

Please sign in to comment.