kazoo icon indicating copy to clipboard operation
kazoo copied to clipboard

zero length 'chunk' should not be an error

Open laprej opened this issue 4 years ago • 1 comments

I don't believe that a zero length chunk should trigger an exception. Rather it's the proper way to indicate the other end of the TCP connection has shutdown. I'm not sure in the end it really changes much: kazoo may treat this as an exceptional event which is a fair interpretation. But the exception name / text is misleading as well. ConnectionClosed('socket closed') might be more appropriate.

https://github.com/python-zk/kazoo/blob/6337fd6f72b59fb20886f980f2e0d6d41525dc35/kazoo/protocol/connection.py#L259-L260

laprej avatar Mar 19 '21 14:03 laprej

Hello,

Good point. I will check if the change is that straightforward as it seems.

StephenSorriaux avatar May 07 '21 14:05 StephenSorriaux