diff --git a/SafeExamBrowser.Server/ServerProxy.cs b/SafeExamBrowser.Server/ServerProxy.cs index afae8e45..9c0a0748 100644 --- a/SafeExamBrowser.Server/ServerProxy.cs +++ b/SafeExamBrowser.Server/ServerProxy.cs @@ -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);