Skip to content

EofStream and autoclose #2784

Closed
Closed
@thomaszdxsn

Description

Long story short

Hi, I meet a problem with websocket's client message, sometimes I will receive EofStream object instead of bytes or str(so broken my program).I don't now what's this object.But I guess it means EOF right?

async for msg in self._ws_conn:
    msg_data = json.loads(msg_data)  # msg_data maybe EofStream

Expected behaviour

If EofStream meaning EOF, Why not just close this websocket connection, beacuase I see ws_connect() have a argument named 'autoclose', it default to True?

Or EofStream has other meaning?

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