Skip to content

Commit

Permalink
Cleanup resoruce if qos start failed (#12993)
Browse files Browse the repository at this point in the history
  • Loading branch information
AlbumenJ committed Sep 1, 2023
1 parent bfa46f5 commit e436f1e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
Expand Up @@ -134,6 +134,11 @@ private void startQosServer(URL url) throws RpcException {

} catch (Throwable throwable) {
logger.warn(QOS_FAILED_START_SERVER, "", "", "Fail to start qos server: ", throwable);
try {
stopServer();
} catch (Throwable stop) {
logger.warn(QOS_FAILED_START_SERVER, "", "", "Fail to stop qos server: ", stop);
}
if (qosCheck) {
throw new RpcException(throwable);
}
Expand Down
Expand Up @@ -137,6 +137,7 @@ public void stop() {
if (worker != null) {
worker.shutdownGracefully();
}
started.set(false);
}

public String getHost() {
Expand Down

0 comments on commit e436f1e

Please sign in to comment.