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

zero length 'chunk' should not be an error #640

Open
laprej opened this issue Mar 19, 2021 · 1 comment
Open

zero length 'chunk' should not be an error #640

laprej opened this issue Mar 19, 2021 · 1 comment

Comments

@laprej
Copy link

laprej commented Mar 19, 2021

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.

if chunk == b'':
raise ConnectionDropped('socket connection broken')

@StephenSorriaux
Copy link
Member

Hello,

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants