diff --git a/core/src/main/scala/spark/network/ConnectionManager.scala b/core/src/main/scala/spark/network/ConnectionManager.scala
index 9b00fddd40557abee4fc6e4827591da30a951ae9..925d076951c6cd56088a56804480efe569cb9748 100644
--- a/core/src/main/scala/spark/network/ConnectionManager.scala
+++ b/core/src/main/scala/spark/network/ConnectionManager.scala
@@ -255,30 +255,30 @@ private[spark] class ConnectionManager(port: Int) extends Logging {
         }
 
         val selectedKeysCount =
-        try {
-          selector.select()
-        } catch {
-          case e: CancelledKeyException => {
-            // Some keys within the selectors list are invalid/closed. clear them.
-            val allKeys = selector.keys().iterator()
-
-            while (allKeys.hasNext()) {
-              val key = allKeys.next()
-              try {
-                if (! key.isValid) {
-                  logInfo("Key not valid ? " + key)
-                  throw new CancelledKeyException()
-                }
-              } catch {
-                case e: CancelledKeyException => {
-                  logInfo("key already cancelled ? " + key, e)
-                  triggerForceCloseByException(key, e)
+          try {
+            selector.select()
+          } catch {
+            case e: CancelledKeyException => {
+              // Some keys within the selectors list are invalid/closed. clear them.
+              val allKeys = selector.keys().iterator()
+
+              while (allKeys.hasNext()) {
+                val key = allKeys.next()
+                try {
+                  if (! key.isValid) {
+                    logInfo("Key not valid ? " + key)
+                    throw new CancelledKeyException()
+                  }
+                } catch {
+                  case e: CancelledKeyException => {
+                    logInfo("key already cancelled ? " + key, e)
+                    triggerForceCloseByException(key, e)
+                  }
                 }
               }
             }
+            0
           }
-          0
-        }
 
         if (selectedKeysCount == 0) {
           logDebug("Selector selected " + selectedKeysCount + " of " + selector.keys.size + " keys")