I would like to test whether an HttpException is a disconnected error.
A naive implementation would check the message:
bool IsClientDisconnectedError(HttpException exception)
{
return exception.Message == "The client disconnected.";
}
How can I check for a client disconnected error without depending on the exception message?