diff --git a/backend/src/main/java/io/metersphere/websocket/ReportWebSocket.java b/backend/src/main/java/io/metersphere/websocket/ReportWebSocket.java index c8f6aff33d..4e4429d600 100644 --- a/backend/src/main/java/io/metersphere/websocket/ReportWebSocket.java +++ b/backend/src/main/java/io/metersphere/websocket/ReportWebSocket.java @@ -79,7 +79,7 @@ public class ReportWebSocket { while (stopMe) { try { LoadTestReport report = reportService.getReport(reportId); - if (StringUtils.equalsAny(report.getStatus(), PerformanceTestStatus.Completed.name(), PerformanceTestStatus.Error.name())) { + if (report == null || StringUtils.equalsAny(report.getStatus(), PerformanceTestStatus.Completed.name(), PerformanceTestStatus.Error.name())) { this.stopMe(); session.close(); break;