Commit 46be338b authored by Nick Craver's avatar Nick Craver

Fix null ref in Sentinel

parent a01cd041
...@@ -2320,7 +2320,7 @@ internal EndPoint GetConfiguredMasterForService(string serviceName, int timeoutm ...@@ -2320,7 +2320,7 @@ internal EndPoint GetConfiguredMasterForService(string serviceName, int timeoutm
Task<Task<EndPoint>> firstCompleteRequest = WaitFirstNonNullIgnoreErrorsAsync(sentinelMasters); Task<Task<EndPoint>> firstCompleteRequest = WaitFirstNonNullIgnoreErrorsAsync(sentinelMasters);
if (!firstCompleteRequest.Wait(timeoutmillis)) if (!firstCompleteRequest.Wait(timeoutmillis))
throw new TimeoutException("Timeout resolving master for service"); throw new TimeoutException("Timeout resolving master for service");
if (firstCompleteRequest.Result.Result == null) if (firstCompleteRequest.Result?.Result == null)
throw new Exception("Unable to determine master"); throw new Exception("Unable to determine master");
return firstCompleteRequest.Result.Result; return firstCompleteRequest.Result.Result;
......
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