On Mon, 21 Feb 2005 18:46:18 +0100, Andrea Arcangeli
Ok here we go, I even found a severe bug in the linereceiver code and I fixed it as well. The bug in linereceiver happens like this:
Any chance that you could include some unit tests for the behavior you're expecting? I think it might need to be fixed a different way. For example:
Index: Twisted/twisted/protocols/basic.py =================================================================== --- Twisted/twisted/protocols/basic.py (revision 13001) +++ Twisted/twisted/protocols/basic.py (working copy) . . . self.recvd = self.recvd + recd - while len(self.recvd) > 1: + while len(self.recvd) > 1 and not self.paused:
This seems like it could lead to some unpleasantly large (i.e. quadratic-time concatenation) buffers strings being left around if you pause one of these receivers and then forget to unpause it, or even just if your peer happens to be sending data very rapidly.