kafka-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jun...@apache.org
Subject git commit: kafka-1228; Socket Leak on ReplicaFetcherThread; patched by Ahmy Yulrizka; reviewed by Jun Rao
Date Thu, 30 Jan 2014 18:15:00 GMT
Updated Branches:
  refs/heads/trunk 9c1d8e35c -> 2b0c6a7d7


kafka-1228; Socket Leak on ReplicaFetcherThread; patched by Ahmy Yulrizka; reviewed by Jun
Rao


Project: http://git-wip-us.apache.org/repos/asf/kafka/repo
Commit: http://git-wip-us.apache.org/repos/asf/kafka/commit/2b0c6a7d
Tree: http://git-wip-us.apache.org/repos/asf/kafka/tree/2b0c6a7d
Diff: http://git-wip-us.apache.org/repos/asf/kafka/diff/2b0c6a7d

Branch: refs/heads/trunk
Commit: 2b0c6a7d7b83a58362e32191674e55da25d3077f
Parents: 9c1d8e3
Author: Ahmy Yulrizka <yulrizka@gmail.com>
Authored: Thu Jan 30 10:14:53 2014 -0800
Committer: Jun Rao <junrao@gmail.com>
Committed: Thu Jan 30 10:14:53 2014 -0800

----------------------------------------------------------------------
 core/src/main/scala/kafka/consumer/SimpleConsumer.scala | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/kafka/blob/2b0c6a7d/core/src/main/scala/kafka/consumer/SimpleConsumer.scala
----------------------------------------------------------------------
diff --git a/core/src/main/scala/kafka/consumer/SimpleConsumer.scala b/core/src/main/scala/kafka/consumer/SimpleConsumer.scala
index 24f7fb5..6dae149 100644
--- a/core/src/main/scala/kafka/consumer/SimpleConsumer.scala
+++ b/core/src/main/scala/kafka/consumer/SimpleConsumer.scala
@@ -72,19 +72,18 @@ class SimpleConsumer(val host: String,
         blockingChannel.send(request)
         response = blockingChannel.receive()
       } catch {
-        case e : java.io.IOException =>
-          info("Reconnect due to socket error: %s".format(e.getMessage))
+        case e : Throwable =>
+          warn("Reconnect due to socket error: %s".format(e.getMessage))
           // retry once
           try {
             reconnect()
             blockingChannel.send(request)
             response = blockingChannel.receive()
           } catch {
-            case ioe: java.io.IOException =>
+            case e: Throwable =>
               disconnect()
-              throw ioe
+              throw e
           }
-        case e: Throwable => throw e
       }
       response
     }


Mime
View raw message