Github user tillrohrmann commented on a diff in the pull request:
https://github.com/apache/flink/pull/5312#discussion_r162690747
--- Diff:
flink-runtime/src/main/java/org/apache/flink/runtime/webmonitor/WebMonitorEndpoint.java
---
@@ -144,6 +154,15 @@ public WebMonitorEndpoint(
metricQueryServiceRetriever,
executor,
restConfiguration.getTimeout());
+
+ this.leaderElectionService =
Preconditions.checkNotNull(leaderElectionService);
+ this.fatalErrorHandler =
Preconditions.checkNotNull(fatalErrorHandler);
+ }
+
+ @Override
+ public void start() throws Exception {
+ super.start();
+ leaderElectionService.start(this);
--- End diff --
We should also stop the `leaderElectionService`.
---