Fixed error in retry mechanism for SEB server.

This commit is contained in:
Damian Büchel 2021-04-26 12:27:54 +02:00
parent 0720698874
commit 0f72ac7bc4

View file

@ -468,7 +468,7 @@ namespace SafeExamBrowser.Server
{
response = default(HttpResponseMessage);
for (var attempt = 0; attempt < settings.RequestAttempts && response == default(HttpResponseMessage); attempt++)
for (var attempt = 0; attempt < settings.RequestAttempts && (response == default(HttpResponseMessage) || !response.IsSuccessStatusCode); attempt++)
{
var request = new HttpRequestMessage(method, url);