Github user tillrohrmann commented on a diff in the pull request:
@@ -947,6 +964,36 @@ private void closeResourceManagerConnection(Exception
resourceManagerConnection = null;
--- End diff --
The problem is that we want this timeout to start whenever the
`TaskExecutor` loses its connection to the RM and that's when we close the RM
connection. This also covers the case, where we don't know the RM address (e.g.
if the RM loses leadership).