Skip to content

EventsConsumer doesn't work with channels >=2.1.6 #31

Closed
@vfernandezmartinez

Description

@vfernandezmartinez

When using Django Channels >= 2.1.6, EventsConsumer doesn't work. Upon sending a GET request to the SSE endpoint (e.g. with curl), no response data is received back and the connection is left open. EventsConsumer never replies and no events are delivered. This didn't happen with channels 2.1.5, where it works fine.

The implementation of AsyncHttpConsumer was changed in 2.1.6, which seems to be the cause of this issue. As a result, EventsConsumer.disconnect() gets called and the consumer is left in this dangling state. A dirty workaround is to await the self.stream task at the end of EventsConsumer.handle().

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions