This commit is contained in:
Michael Andre Pearce 2019-01-18 22:42:40 +00:00
commit de90d8cfe1
1 changed files with 2 additions and 1 deletions

View File

@ -386,11 +386,12 @@ public class CoreMessage extends RefCountMessage implements ICoreMessage {
if (writableBuffer == null) {
synchronized (this) {
if (writableBuffer == null) {
writableBuffer = new ResetLimitWrappedActiveMQBuffer(BODY_OFFSET, buffer.duplicate(), this);
ResetLimitWrappedActiveMQBuffer writableBuffer = new ResetLimitWrappedActiveMQBuffer(BODY_OFFSET, buffer.duplicate(), this);
if (endOfBodyPosition > 0) {
writableBuffer.byteBuf().setIndex(BODY_OFFSET, endOfBodyPosition - BUFFER_HEADER_SPACE + BODY_OFFSET);
writableBuffer.resetReaderIndex();
}
this.writableBuffer = writableBuffer;
}
}
}