Github user sahilTakiar commented on a diff in the pull request: https://github.com/apache/spark/pull/20893#discussion_r177208050 --- Diff: core/src/main/scala/org/apache/spark/launcher/LauncherBackend.scala --- @@ -114,10 +114,10 @@ private[spark] abstract class LauncherBackend { override def close(): Unit = { try { + _isConnected = false super.close() } finally { onDisconnected() --- End diff -- `_isConnected` is used in `def isConnected()`. Moving it from the `finally` block to before the call to `super.close()` avoids a race condition where a client tries to write to the connection after it has been closed.
--- --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org