Skip to content

Commit 21cdbfc

Browse files
author
Jonny Bekkum
committed
Restored ConfigureAwait(false) on all await calls in SendGridClient
1 parent db7dc90 commit 21cdbfc

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/SendGrid/SendGridClient.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ public virtual AuthenticationHeaderValue AddAuthorization(KeyValuePair<string, s
162162
/// <returns>Response object</returns>
163163
public async Task<Response> MakeRequest(HttpRequestMessage request, CancellationToken cancellationToken = default(CancellationToken))
164164
{
165-
HttpResponseMessage response = await client.SendAsync(request, cancellationToken);
165+
HttpResponseMessage response = await client.SendAsync(request, cancellationToken).ConfigureAwait(false);
166166
return new Response(response.StatusCode, response.Content, response.Headers);
167167
}
168168

@@ -200,7 +200,7 @@ public async Task<Response> RequestAsync(
200200
RequestUri = new Uri(endpoint),
201201
Content = content
202202
};
203-
return await MakeRequest(request, cancellationToken);
203+
return await MakeRequest(request, cancellationToken).ConfigureAwait(false);
204204
}
205205
catch (Exception ex)
206206
{
@@ -223,7 +223,7 @@ public async Task<Response> RequestAsync(
223223
Method.POST,
224224
msg.Serialize(),
225225
urlPath: "mail/send",
226-
cancellationToken: cancellationToken);
226+
cancellationToken: cancellationToken).ConfigureAwait(false);
227227
}
228228

229229
/// <summary>

0 commit comments

Comments
 (0)