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

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

Closed
vfernandezmartinez opened this issue Feb 24, 2019 · 2 comments
Closed

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

vfernandezmartinez opened this issue Feb 24, 2019 · 2 comments

Comments

@vfernandezmartinez
Copy link

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().

@jkarneges
Copy link
Member

Indeed (django/channels#1249). I'll look at implementing a workaround soon, or pin the dependency to 2.1.5.

@jkarneges
Copy link
Member

Released new version with workaround.

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

No branches or pull requests

2 participants