Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

fix bug in pubsub protocol decoding

  • Loading branch information...
commit acb008ebc2891467ae5ed5cb2d4a1b34c036c727 1 parent 0337f8e
Will Glozer authored
5 README
View
@@ -6,7 +6,8 @@ lettuce - A scalable Java Redis client
Multiple connections are efficiently managed by the excellent netty NIO
framework.
- This version of lettuce has been tested against redis 2.4.7
+ This version of lettuce has been tested against redis 2.6-rc3 but should be
+ backwards-compatible to older redis versions.
Join the lambdaWorks-OSS Google Group to discuss this project:
@@ -72,5 +73,5 @@ Maven Artifacts
<dependency>
<groupId>com.lambdaworks</groupId>
<artifactId>lettuce</artifactId>
- <version>2.0.0</version>
+ <version>2.1.0</version>
</dependency>
2  pom.xml
View
@@ -5,7 +5,7 @@
<groupId>com.lambdaworks</groupId>
<artifactId>lettuce</artifactId>
- <version>2.0.0</version>
+ <version>2.1.0</version>
<packaging>jar</packaging>
5 src/main/java/com/lambdaworks/redis/pubsub/PubSubCommandHandler.java
View
@@ -20,6 +20,7 @@
*/
public class PubSubCommandHandler<K, V> extends CommandHandler<K, V> {
private RedisCodec<K, V> codec;
+ private PubSubOutput<K, V> output;
/**
* Initialize a new instance.
@@ -29,7 +30,8 @@
*/
public PubSubCommandHandler(BlockingQueue<Command<K, V, ?>> queue, RedisCodec<K, V> codec) {
super(queue);
- this.codec = codec;
+ this.codec = codec;
+ this.output = new PubSubOutput<K, V>(codec);
}
@Override
@@ -41,7 +43,6 @@ protected void decode(ChannelHandlerContext ctx, ChannelBuffer buffer) throws In
if (output instanceof PubSubOutput) Channels.fireMessageReceived(ctx, output);
}
- PubSubOutput<K, V> output = new PubSubOutput<K, V>(codec);
while (rsm.decode(buffer, output)) {
Channels.fireMessageReceived(ctx, output);
output = new PubSubOutput<K, V>(codec);
Please sign in to comment.
Something went wrong with that request. Please try again.