Hi Oleg

I am looking at the SharedInputBuffer, for which Jason has proposed some fixes (https://issues.apache.org/jira/browse/HTTPCORE-172), with which I agree.

Sometime back my original fix for it, was to not shutdown the buffer, while it had data which was not yet read as:

public void shutdown() {
       if (this.shutdown) {
           return;
       }
       if (!hasData() && this.endOfStream) {
           this.shutdown = true;
           synchronized (this.mutex) {
               this.mutex.notifyAll();
           }
       }
   }

However, I think Jasons version of the fix as described in the above JIRA is better. Do you have any comments on these approaches?

However, even after the above version of the fix, Eric reported that he saw the same resultant error usually caused by this bug in his production environment.

I was looking at the following code:

public int consumeContent(final ContentDecoder decoder) throws IOException {
       if (this.shutdown) {
           return -1;
       }

and wondering why you have the above if condition.. is it even remotely possible for a consumeContent() call (triggered by an inputReady() to come after a closed() call? If so, we may need another fix here..

thanks
asankha

--
Asankha C. Perera

WSO2 - http://wso2.org
http://esbmagic.blogspot.com

Reply via email to