Author: trustin
Date: 2009-11-30 06:14:33 -0500 (Mon, 30 Nov 2009)
New Revision: 8467
Modified:
trunk/src/main/org/hornetq/integration/transports/netty/HornetQFrameDecoder2.java
Log:
Fixed a bug in HornetQFrameDecoder where the decoder does not generate a frame on a
certain fragmentation pattern
Modified:
trunk/src/main/org/hornetq/integration/transports/netty/HornetQFrameDecoder2.java
===================================================================
---
trunk/src/main/org/hornetq/integration/transports/netty/HornetQFrameDecoder2.java 2009-11-30
11:09:47 UTC (rev 8466)
+++
trunk/src/main/org/hornetq/integration/transports/netty/HornetQFrameDecoder2.java 2009-11-30
11:14:33 UTC (rev 8467)
@@ -82,7 +82,7 @@
break;
case 4:
length = previousData.getInt(previousData.readerIndex());
- if (in.readableBytes() - 4 < length) {
+ if (in.readableBytes() < length) {
append(in, length);
return;
}
@@ -112,11 +112,12 @@
}
frame.skipBytes(4);
- Channels.fireMessageReceived(ctx, frame);
-
if (!in.readable()) {
previousData = ChannelBuffers.EMPTY_BUFFER;
+ Channels.fireMessageReceived(ctx, frame);
return;
+ } else {
+ Channels.fireMessageReceived(ctx, frame);
}
}
Show replies by date