From 0ee56423662cf1a4a993edf940b53ca97898ddfb Mon Sep 17 00:00:00 2001 From: Harsh Gupta Date: Fri, 22 May 2015 01:52:42 +0530 Subject: [PATCH] Changing the loop condition to halt at the first match in the property list for RpcEnv exception catch --- core/src/main/scala/org/apache/spark/rpc/RpcEnv.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/src/main/scala/org/apache/spark/rpc/RpcEnv.scala b/core/src/main/scala/org/apache/spark/rpc/RpcEnv.scala index c8aab1e1ab405..f2d849786fdbf 100644 --- a/core/src/main/scala/org/apache/spark/rpc/RpcEnv.scala +++ b/core/src/main/scala/org/apache/spark/rpc/RpcEnv.scala @@ -266,7 +266,7 @@ object RpcTimeout { // Find the first set property or use the default value with the first property val itr = timeoutPropList.iterator var foundProp = (timeoutPropList.head,defaultValue) - while (itr.hasNext){ + while (itr.hasNext && (foundProp == (timeoutPropList.head,defaultValue))){ val propKey = itr.next() conf.getOption(propKey) match { case Some(prop) => foundProp = (propKey,prop)