Skip to content

Commit 470f38c

Browse files
committed
Special case non-"Address already in use" exceptions
1 parent 1d7e408 commit 470f38c

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

core/src/main/scala/org/apache/spark/util/Utils.scala

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1357,7 +1357,10 @@ private[spark] object Utils extends Logging {
13571357
return (service, port)
13581358
} catch {
13591359
case e: BindException =>
1360-
if (!e.getMessage.contains("Address already in use") || offset >= maxRetries) {
1360+
if (!e.getMessage.contains("Address already in use")) {
1361+
throw e
1362+
}
1363+
if (offset >= maxRetries) {
13611364
val exceptionMessage =
13621365
s"${e.getMessage}: Service$serviceString failed after $maxRetries retries!"
13631366
val exception = new BindException(exceptionMessage)

0 commit comments

Comments
 (0)