fix: 修复停止性能测试的时候无法关闭socket造成空指针的错误
This commit is contained in:
parent
0edc40b09e
commit
9535758d0d
|
@ -79,7 +79,7 @@ public class ReportWebSocket {
|
||||||
while (stopMe) {
|
while (stopMe) {
|
||||||
try {
|
try {
|
||||||
LoadTestReport report = reportService.getReport(reportId);
|
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();
|
this.stopMe();
|
||||||
session.close();
|
session.close();
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in New Issue