You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by pe...@apache.org on 2021/03/23 12:50:59 UTC
[pulsar] 09/16: Continue graceful shutdown even if web service
closing fails (#9835)
This is an automated email from the ASF dual-hosted git repository.
penghui pushed a commit to branch branch-2.7
in repository https://gitbox.apache.org/repos/asf/pulsar.git
commit 46dba82c1915d563c107d04b9f4489cf42168cff
Author: Masahiro Sakamoto <ma...@yahoo-corp.jp>
AuthorDate: Tue Mar 9 01:36:23 2021 +0900
Continue graceful shutdown even if web service closing fails (#9835)
(cherry picked from commit 4320e4a1a3502edc3d72413fbf7b23c21caad1ec)
---
.../src/main/java/org/apache/pulsar/broker/PulsarService.java | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/pulsar-broker/src/main/java/org/apache/pulsar/broker/PulsarService.java b/pulsar-broker/src/main/java/org/apache/pulsar/broker/PulsarService.java
index 1dc5513..fcabff2 100644
--- a/pulsar-broker/src/main/java/org/apache/pulsar/broker/PulsarService.java
+++ b/pulsar-broker/src/main/java/org/apache/pulsar/broker/PulsarService.java
@@ -281,8 +281,13 @@ public class PulsarService implements AutoCloseable {
// close the service in reverse order v.s. in which they are started
if (this.webService != null) {
- this.webService.close();
- this.webService = null;
+ try {
+ this.webService.close();
+ this.webService = null;
+ } catch (Exception e) {
+ LOG.error("Web service closing failed", e);
+ // Even if the web service fails to close, the graceful shutdown process continues
+ }
}
if (this.webSocketService != null) {