Skip to content

Commit

Permalink
Fix SSL receive issues
Browse files Browse the repository at this point in the history
  • Loading branch information
chronoxor committed May 20, 2020
1 parent ec3eb3e commit b76146c
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .appveyor.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Specify version format
version: "3.0.13.{build}"
version: "3.0.14.{build}"

# Image to use
image: Visual Studio 2019
Expand Down
2 changes: 1 addition & 1 deletion source/NetCoreServer/NetCoreServer.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<TargetFramework>netstandard2.1</TargetFramework>
<Version>3.0.13</Version>
<Version>3.0.14</Version>
<Authors>Ivan Shynkarenka</Authors>
<Copyright>Copyright (c) 2019-2020 Ivan Shynkarenka</Copyright>
<RepositoryUrl>https://github.com/chronoxor/NetCoreServer</RepositoryUrl>
Expand Down
5 changes: 4 additions & 1 deletion source/NetCoreServer/SslClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -803,7 +803,10 @@ private void ProcessReceive(IAsyncResult result)

// If zero is returned from a read operation, the remote end has closed the connection
if (size > 0)
TryReceive();
{
if (!result.CompletedSynchronously)
TryReceive();
}
else
DisconnectAsync();
}
Expand Down
5 changes: 4 additions & 1 deletion source/NetCoreServer/SslSession.cs
Original file line number Diff line number Diff line change
Expand Up @@ -575,7 +575,10 @@ private void ProcessReceive(IAsyncResult result)

// If zero is returned from a read operation, the remote end has closed the connection
if (size > 0)
TryReceive();
{
if (!result.CompletedSynchronously)
TryReceive();
}
else
Disconnect();
}
Expand Down

0 comments on commit b76146c

Please sign in to comment.