debasishg / scala-redis

A scala library for connecting to a redis server, or a cluster of redis nodes using consistent hashing on the client side.
1.02k stars 219 forks source link

fixed NPE after clearFD #178

Closed tsuyoshizawa closed 8 years ago

tsuyoshizawa commented 8 years ago

I got NullPointerException after call RedisClient#disconnect using PubSub. Stacktrace is below.

java.lang.NullPointerException: null
        at com.redis.IO$class.readLine(IO.scala:88)
        at com.redis.RedisClient.readLine(RedisClient.scala:94)
        at com.redis.Reply$class.receive(RedisProtocol.scala:120)
        at com.redis.RedisClient.receive(RedisClient.scala:94)
        at com.redis.R$class.asList(RedisProtocol.scala:151)
        at com.redis.RedisClient.asList(RedisClient.scala:94)
        at com.redis.PubSub$Consumer$$anonfun$run$1.apply$mcV$sp(PubSub.scala:34)
        at com.redis.Util$.whileTrue(PubSub.scala:9)
        at com.redis.PubSub$Consumer.run(PubSub.scala:33)
        at java.lang.Thread.run(Thread.java:745)
debasishg commented 8 years ago

Thanks!