Skip to content

Commit

Permalink
DNET-724
Browse files Browse the repository at this point in the history
  • Loading branch information
cincuranet committed Dec 7, 2016
1 parent 79903bf commit ed60dad
Showing 1 changed file with 8 additions and 1 deletion.
Expand Up @@ -141,12 +141,19 @@ private void ThreadHandler(object _)
}
}
}
catch (IOException ex) when ((ex.InnerException as SocketException)?.SocketErrorCode == SocketError.Interrupted)
catch (IOException ex) when (IsEventsReturnSocketError((ex.InnerException as SocketException)?.SocketErrorCode))
{
return;
}
}

private bool IsEventsReturnSocketError(SocketError? error)
{
return error == SocketError.Interrupted
|| error == SocketError.ConnectionReset
|| error == SocketError.ConnectionAborted;
}

#endregion
}
}

0 comments on commit ed60dad

Please sign in to comment.