xetorthio/jedis — pull request #358 by leochen36 (2012-10-08 16:09:41+00:00)
Title: Update src/main/java/redis/clients/util/RedisOutputStream.java

flushBuffer() this add try finally,because when out.write(buf, 0, count); throw error,the count=0 is not exec; ?it's cause java.lang.ClassCastException: java.util.ArrayList cannot be cast to java.lang.Long? ?at redis.clients.jedis.Connection.getIntegerReply(Connection.java:161)? ?at redis.clients.jedis.Jedis.del(Jedis.java:108)? 在这个方法里，应该加入try finally，因为当out.write(buf, 0, count); 这句抛出异常时，会造成 count=0;这一行 不能正常执行，就行造成部分剩余的错误命令在下次的请求中，会再次发送，将会造成java.lang.ClassCastException异常