Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BUG in method loadMulti of AscIIClient.java #57

Closed
chenxiaohu opened this issue Feb 27, 2013 · 3 comments
Closed

BUG in method loadMulti of AscIIClient.java #57

chenxiaohu opened this issue Feb 27, 2013 · 3 comments

Comments

@chenxiaohu
Copy link

AscIIClient.java 1203 line should change FROM:

} else if (END.equals(line)) {

TO

} else if ("END".equals(line)) {

because readLine method of ByteBufArrayInputStream use return bos.toString().trim() trim the "\r\n" .

@mengli
Copy link
Collaborator

mengli commented Mar 30, 2014

Hi chenxiaohu,

Could you please give me an test case to show why you want to make this modification? Otherwise I can't make sure this is a bug.

Meng

@chenxiaohu
Copy link
Author

I can't give an test case, bug I debug the code, if don't modify, the code below throws exception every time when call com.schooner.MemCached.AscIIClient.loadMulti...

shouldn't happen become always happen.

for (Connection c : conns) {
    try {
        if (c.incoming.size() > 0 && c.isDone())
            loadMulti(new ByteBufArrayInputStream(c.incoming), ret, asString);
        } catch (Exception e) {
            // shouldn't happen; we have all the data already
            log.debug("Caught the aforementioned exception on " + c);
        }
    }   
}

java.io.IOException: ++++ Stream appears to be dead, so closing it down
    at com.schooner.MemCached.ByteBufArrayInputStream.readLine(Unknown Source)
    at com.schooner.MemCached.AscIIClient.loadMulti(AscIIClient.java:1140)
    at com.schooner.MemCached.AscIIClient.access$300(AscIIClient.java:64)
    at com.schooner.MemCached.AscIIClient$NIOLoader.doMulti(AscIIClient.java:1563)
    at com.schooner.MemCached.AscIIClient.getMulti(AscIIClient.java:1101)
    at com.schooner.MemCached.AscIIClient.getMulti(AscIIClient.java:1025)
    at com.whalin.MemCached.MemCachedClient.getMulti(Unknown Source)
    at com.whalin.MemCached.MemCachedClient.getMulti(Unknown Source)
    at com.schooner.MemCached.MemCachedClientAsciiTest.testGetMulti(Unknown Source)

mengli added a commit that referenced this issue Apr 3, 2014
@mengli
Copy link
Collaborator

mengli commented Apr 3, 2014

Hi chenxiaohu,

It has been fixed in the latest commit. Really thank you for your help!

Meng

@mengli mengli closed this as completed Apr 3, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants