kazoo
kazoo copied to clipboard
zero length 'chunk' should not be an error
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
Hello,
Good point. I will check if the change is that straightforward as it seems.