Skip to content

Commit

Permalink
Special case non-"Address already in use" exceptions
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewor14 committed Aug 5, 2014
1 parent 1d7e408 commit 470f38c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion core/src/main/scala/org/apache/spark/util/Utils.scala
Original file line number Diff line number Diff line change
Expand Up @@ -1357,7 +1357,10 @@ private[spark] object Utils extends Logging {
return (service, port)
} catch {
case e: BindException =>
if (!e.getMessage.contains("Address already in use") || offset >= maxRetries) {
if (!e.getMessage.contains("Address already in use")) {
throw e
}
if (offset >= maxRetries) {
val exceptionMessage =
s"${e.getMessage}: Service$serviceString failed after $maxRetries retries!"
val exception = new BindException(exceptionMessage)
Expand Down

0 comments on commit 470f38c

Please sign in to comment.