Skip to content

Commit

Permalink
fix(iot-svc): update debug assert
Browse files Browse the repository at this point in the history
  • Loading branch information
David R. Williamson committed Jan 3, 2022
1 parent d22f9f3 commit f1ef207
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions iothub/device/src/IotHubConnectionString.Core.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@ Task<string> IAuthorizationProvider.GetPasswordAsync()
if (Logging.IsEnabled)
Logging.Enter(this, $"{nameof(IotHubConnectionString)}.{nameof(IAuthorizationProvider.GetPasswordAsync)}");

Debug.Assert(TokenRefresher != null);
Debug.Assert(!string.IsNullOrWhiteSpace(SharedAccessSignature) || TokenRefresher != null, "Both can't be null");

return !string.IsNullOrWhiteSpace(SharedAccessSignature)
? Task.FromResult(SharedAccessSignature)
: TokenRefresher.GetTokenAsync(Audience);
: TokenRefresher?.GetTokenAsync(Audience);
}
finally
{
Expand Down

0 comments on commit f1ef207

Please sign in to comment.