Skip to content

Commit 1e12109

Browse files
committed
Fix async issue
1 parent fc929cc commit 1e12109

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/Umbraco.Forms.Integrations.Crm.Hubspot/Services/HubspotContactService.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -287,7 +287,7 @@ private async Task<string> GetOAuthAccessTokenFromCacheOrRefreshToken(string ref
287287
if (string.IsNullOrEmpty(accessToken))
288288
{
289289
// No access token in the cache, so get a new one from the refresh token.
290-
await RefreshOAuthAccessToken(refreshToken);
290+
await RefreshOAuthAccessToken(refreshToken).ConfigureAwait(false);
291291
accessToken = _appCaches.RuntimeCache.GetCacheItem<string>(AccessTokenCacheKey);
292292
}
293293

@@ -353,7 +353,8 @@ private async Task<HttpResponseMessage> GetResponse(
353353
break;
354354
case AuthenticationMode.OAuth:
355355
requestMessage.Headers.Authorization =
356-
new AuthenticationHeaderValue("Bearer", await GetOAuthAccessTokenFromCacheOrRefreshToken(authenticationDetails.RefreshToken));
356+
new AuthenticationHeaderValue("Bearer",
357+
await GetOAuthAccessTokenFromCacheOrRefreshToken(authenticationDetails.RefreshToken).ConfigureAwait(false));
357358
break;
358359
}
359360
}

0 commit comments

Comments
 (0)