Skip to content

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

Open
@laprej

Description

@laprej

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')

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions