|
I tried adding Bruno D'Avanzo to the cc list unsuccessfully as this appears to
be related to code he wrote and he may know better why it's written the way it is. He may have gone inactive. I'll try to find his non-apache.org email address. Unfortunately, I don't have enough spare cycles right now to investigate this Does anyone have knowledge of this code?
I am willing to put time into a patch, but the documentation for the class is Created an attachment (id=17905)
Proposed patch for hanging read bug I believe what's happening is the buffer (queue) fills up and there is still
more data to be read from the socket. When this happens in threaded mode, the reader thread waits in __processChar, giving the consumer thread a chance to drain the buffer. That seems to work fine. When threaded mode is disabled, however, we need to stop collecting data from I've submitted a patch that I think fixes the problem. But since I'm unfamiliar Basically, what I've done is add a check in read() to the while loop that was All unit tests pass, and the new code prevented hangs in my ad hoc tests. I Applied patch. Thanks Rob.
It looks like this patch has been applied for an "1.4.x" version of Commons Net,
but I cannot find such a released version anywhere. How can I get a version of Commons Net that's compatible with 1.4.1 but has the patch? It also appears to be possible to run into this bug in threaded mode. It is possible for the close method to set the threaded state to false while the reader is still active. Under these circumstances the same infinite loop is invoked. I am also curious when the next build will be happening so I can see if the patch fixes this situation as well.
You can try the prerelease at
Reclosing so it gets marked as Fixed. Jira migration bug.
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
the "while" loop. It occurs right after the "if(__threaded)" block.