synapse-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Asankha C. Perera" <>
Subject Connection closes and SharedInputBuffer shutdown
Date Fri, 29 Aug 2008 12:44:55 GMT
Hi Oleg

I am looking at the SharedInputBuffer, for which Jason has proposed some 
fixes (, with which I 

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) {
        if (!hasData() && this.endOfStream) {
            this.shutdown = true;
            synchronized (this.mutex) {

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..


Asankha C. Perera

WSO2 -

View raw message