Skip to content

Commit

Permalink
Adding InvalidArgument to closing socket errors
Browse files Browse the repository at this point in the history
  • Loading branch information
nayato committed Nov 6, 2017
1 parent 65b4735 commit a758ec0
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ protected override void ScheduleSocketRead()
}
return;
}
catch (SocketException ex) when (ex.SocketErrorCode == SocketError.OperationAborted)
catch (SocketException ex) when (ex.SocketErrorCode == SocketError.OperationAborted || ex.SocketErrorCode == SocketError.InvalidArgument)
{
closed = true;
}
Expand Down Expand Up @@ -211,7 +211,7 @@ public override void FinishRead(SocketChannelAsyncOperation operation)
allocHandle.IncMessagesRead(1);
}
}
catch (SocketException ex) when (ex.SocketErrorCode == SocketError.OperationAborted)
catch (SocketException ex) when (ex.SocketErrorCode == SocketError.OperationAborted || ex.SocketErrorCode == SocketError.InvalidArgument)
{
closed = true;
}
Expand Down

0 comments on commit a758ec0

Please sign in to comment.