Hi Bo,
> Thank you for integrating the changes. However it seems like the
> changes still suffers from issue 655. I have attached a patch that
> fixes it in the latest revision. Please see the comments in the
> patch for an explanation.
Fixed (see inlined)
Thank you very much for feedback.
WBR,
Alexey.
>
> Thanks again
> Bo
>>
> Index: modules/grizzly/src/main/java/com/sun/grizzly/streams/
> AbstractStreamWriter.java
> ===================================================================
> --- modules/grizzly/src/main/java/com/sun/grizzly/streams/
> AbstractStreamWriter.java (revision 3430)
> +++ modules/grizzly/src/main/java/com/sun/grizzly/streams/
> AbstractStreamWriter.java Wed Jul 08 17:55:50 CDT 2009
> @@ -124,6 +124,12 @@
>
> initBuffer();
> } else {
> + // Buffer size could have changed even though it is
> + // empty. Need to reallocate for this case as well.
> + if (buffer.capacity() != bufferSize) {
> + buffer = reallocateBuffer(buffer, bufferSize);
> + }
> +
> future = ZERO_READY_FUTURE;
> if (completionHandler != null) {
> completionHandler.completed(connection, ZERO);
You're right, I missed this.
> Index: modules/grizzly/src/main/java/com/sun/grizzly/memory/
> DefaultMemoryManager.java
> ===================================================================
> --- modules/grizzly/src/main/java/com/sun/grizzly/memory/
> DefaultMemoryManager.java (revision 3430)
> +++ modules/grizzly/src/main/java/com/sun/grizzly/memory/
> DefaultMemoryManager.java Wed Jul 08 17:55:50 CDT 2009
> @@ -158,7 +158,8 @@
> @Override
> public ByteBufferWrapper reallocate(ByteBufferWrapper oldBuffer,
> int newSize) {
> - if (oldBuffer.capacity() <= newSize) return oldBuffer;
> + // What is this here? Can't reallocate to a bigger buffer?
> + //if (oldBuffer.capacity() <= newSize) return oldBuffer;
>
> if (isDefaultWorkerThread()) {
> final BufferInfo bufferInfo = getThreadBuffer();
Just a mistype, but very serious! Good catch!
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_grizzly.dev.java.net
> For additional commands, e-mail: users-help_at_grizzly.dev.java.net