Commit c055f320 authored by Alexey Zinoviev's avatar Alexey Zinoviev Committed by Nick Craver

Set SocketClosed on EndOfStreamException. (#702)

It was unreachable because EndOfStreamException is inherited from IOException.
parent 1cd9fcf5
...@@ -295,8 +295,8 @@ internal static void IdentifyFailureType(Exception exception, ref ConnectionFail ...@@ -295,8 +295,8 @@ internal static void IdentifyFailureType(Exception exception, ref ConnectionFail
{ {
if (exception is AggregateException) exception = exception.InnerException ?? exception; if (exception is AggregateException) exception = exception.InnerException ?? exception;
if (exception is AuthenticationException) failureType = ConnectionFailureType.AuthenticationFailure; if (exception is AuthenticationException) failureType = ConnectionFailureType.AuthenticationFailure;
else if (exception is SocketException || exception is IOException) failureType = ConnectionFailureType.SocketFailure;
else if (exception is EndOfStreamException) failureType = ConnectionFailureType.SocketClosed; else if (exception is EndOfStreamException) failureType = ConnectionFailureType.SocketClosed;
else if (exception is SocketException || exception is IOException) failureType = ConnectionFailureType.SocketFailure;
else if (exception is ObjectDisposedException) failureType = ConnectionFailureType.SocketClosed; else if (exception is ObjectDisposedException) failureType = ConnectionFailureType.SocketClosed;
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment