Skip to content

Commit 28233d6

Browse files
author
Qiming Yuan
committed
Fix host type checking bug.
1 parent 4bd5a2c commit 28233d6

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

Dropbox.Api/DropboxRequestHandler.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -414,7 +414,7 @@ private async Task<Result> RequestJsonString(
414414
}
415415

416416
var disposeResponse = true;
417-
var response = await this.getHttpClient(hostname).SendAsync(request, completionOption).ConfigureAwait(false);
417+
var response = await this.getHttpClient(host).SendAsync(request, completionOption).ConfigureAwait(false);
418418

419419
var requestId = GetRequestId(response);
420420
try
@@ -528,11 +528,11 @@ private string GetRequestId(HttpResponseMessage response)
528528
/// <summary>
529529
/// Get http client for given host.
530530
/// </summary>
531-
/// <param name="hostname">The host name.</param>
531+
/// <param name="host">The host type.</param>
532532
/// <returns>The <see cref="HttpClient"/>.</returns>
533-
private HttpClient getHttpClient(string hostname)
533+
private HttpClient getHttpClient(string host)
534534
{
535-
if (hostname == HostType.ApiNotify)
535+
if (host == HostType.ApiNotify)
536536
{
537537
return this.options.LongPollHttpClient ?? this.defaultLongPollHttpClient;
538538
}

0 commit comments

Comments
 (0)