Github user vanzin commented on a diff in the pull request:

    https://github.com/apache/spark/pull/20297#discussion_r162694343
  
    --- Diff: 
launcher/src/main/java/org/apache/spark/launcher/LauncherServer.java ---
    @@ -331,23 +358,27 @@ protected void handle(Message msg) throws IOException 
{
               timeout.cancel();
             }
             close();
    +        if (handle != null) {
    +          handle.dispose();
    +        }
           } finally {
             timeoutTimer.purge();
           }
         }
     
         @Override
         public void close() throws IOException {
    +      if (!isOpen()) {
    +        return;
    +      }
    +
           synchronized (clients) {
             clients.remove(this);
           }
    -      super.close();
    -      if (handle != null) {
    -        if (!handle.getState().isFinal()) {
    -          LOG.log(Level.WARNING, "Lost connection to spark application.");
    -          handle.setState(SparkAppHandle.State.LOST);
    -        }
    -        handle.disconnect();
    --- End diff --
    
    See https://github.com/apache/spark/pull/20297#pullrequestreview-89568079


---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to