Commit a194c28d authored by Marc Gravell's avatar Marc Gravell Committed by GitHub

Merge pull request #426 from u-abramchuk/master

fix NullReferenceException when retriving LastException from ServerEn…
parents 7acc1c95 d6a734c5
......@@ -101,7 +101,8 @@ internal Exception LastException
//check if subscription endpoint has a better lastexception
if (tmp2 != null && tmp2.LastException != null)
{
if (!tmp2.LastException.Data["Redis-FailureType"].ToString().Equals(ConnectionFailureType.UnableToConnect.ToString()))
var failureType = tmp2.LastException.Data["Redis-FailureType"];
if (failureType != null && !failureType.ToString().Equals(ConnectionFailureType.UnableToConnect.ToString()))
{
return tmp2.LastException;
}
......
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