Judging qos is in started state when stopping qos (#13271)

This commit is contained in:
TomlongTK 2023-11-01 20:04:31 +08:00 committed by GitHub
parent 34fda039b9
commit 1a6dbbe2ca
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 1 deletions

View File

@ -153,7 +153,9 @@ public class QosProtocolWrapper implements Protocol, ScopeModelAware {
/*package*/ void stopServer() {
if (hasStarted.compareAndSet(true, false)) {
Server server = frameworkModel.getBeanFactory().getBean(Server.class);
server.stop();
if (server.isStarted()) {
server.stop();
}
}
}
}