Skip to content

Commit 653a07b

Browse files
committed
[SPARK-7236] Fix to prevent AkkaUtils askWithReply from sleeping on final attempt
1 parent 49549d5 commit 653a07b

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,9 @@ private[spark] object AkkaUtils extends Logging {
183183
lastException = e
184184
logWarning(s"Error sending message [message = $message] in $attempts attempts", e)
185185
}
186-
Thread.sleep(retryInterval)
186+
if (attempts < maxAttempts) {
187+
Thread.sleep(retryInterval)
188+
}
187189
}
188190

189191
throw new SparkException(

0 commit comments

Comments
 (0)