diff --git a/core/src/main/kotlin/org/evomaster/core/problem/httpws/auth/AuthUtils.kt b/core/src/main/kotlin/org/evomaster/core/problem/httpws/auth/AuthUtils.kt index 2329252381..9ab65c621e 100644 --- a/core/src/main/kotlin/org/evomaster/core/problem/httpws/auth/AuthUtils.kt +++ b/core/src/main/kotlin/org/evomaster/core/problem/httpws/auth/AuthUtils.kt @@ -188,10 +188,12 @@ object AuthUtils { val location = response.getHeaderString("location") if (location != null && (location.contains("error", true) || location.contains("login", true))) { log.warn("Login request failed with ${response.status} redirection toward $location") + response.close() return null } } else { log.warn("Login request failed with status ${response.status}") + response.close() return null } }