aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGary Wilber <Spacetech326@gmail.com>2020-10-02 17:19:35 -0700
committerGary Wilber <Spacetech326@gmail.com>2020-10-02 17:19:35 -0700
commitdb2e667936a3c982ad28fb383efd427f24e4e37d (patch)
tree60d001ffca52bc2f1d0e7c54dbaff7e0feda5357
parent04cdc89a5c9f92c70078520eb5c63fd2606f2a22 (diff)
expand try finally
-rw-r--r--MediaBrowser.Providers/Plugins/MusicBrainz/MusicBrainzAlbumProvider.cs12
1 files changed, 6 insertions, 6 deletions
diff --git a/MediaBrowser.Providers/Plugins/MusicBrainz/MusicBrainzAlbumProvider.cs b/MediaBrowser.Providers/Plugins/MusicBrainz/MusicBrainzAlbumProvider.cs
index 2d37422d0..5fe9ef7fa 100644
--- a/MediaBrowser.Providers/Plugins/MusicBrainz/MusicBrainzAlbumProvider.cs
+++ b/MediaBrowser.Providers/Plugins/MusicBrainz/MusicBrainzAlbumProvider.cs
@@ -782,18 +782,18 @@ namespace MediaBrowser.Providers.Music
// We retry a finite number of times, and only whilst MB is indicating 503 (throttling)
}
while (attempts < MusicBrainzQueryAttempts && response.StatusCode == HttpStatusCode.ServiceUnavailable);
+
+ // Log error if unable to query MB database due to throttling
+ if (attempts == MusicBrainzQueryAttempts && response.StatusCode == HttpStatusCode.ServiceUnavailable)
+ {
+ _logger.LogError("GetMusicBrainzResponse: 503 Service Unavailable (throttled) response received {0} times whilst requesting {1}", attempts, requestUrl);
+ }
}
finally
{
_apiRequestLock.Release();
}
- // Log error if unable to query MB database due to throttling
- if (attempts == MusicBrainzQueryAttempts && response.StatusCode == HttpStatusCode.ServiceUnavailable)
- {
- _logger.LogError("GetMusicBrainzResponse: 503 Service Unavailable (throttled) response received {0} times whilst requesting {1}", attempts, requestUrl);
- }
-
return response;
}