Skip to content

In client/__init__.py: remaining 'body' bytes ignored #46

@jsalz

Description

@jsalz

client/init.py has:

self.__buffer = body

It looks like self.__buffer is never used, which means that if any bytes (e.g., the first data packet) are received along with the headers, those bytes will be ignored and the connection will probably get into a bad state.

Adding this after handshake_ok() fixes things in this case:

if body != '':
process(body)

Does that seem like a reasonable fix?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions