title: Why my Django app server-send events endpoint close immediately?
body: <p>I am making endpoints for stream data with Django and django-eventstream from Fanout. But whenever I connect to the endpoint, it return data then close. For example:</p>
  
  <pre><code>http --stream http://127.0.0.1:8000/stream-api/projects/22/feeds/ 
  </code></pre>
  
  <p>Response:</p>
  
  <pre><code>HTTP/1.1 200 OK
  Cache-Control: no-cache
  Content-Length: 2077
  Content-Type: text/event-stream
  Date: Fri, 19 Apr 2019 23:57:20 GMT
  Grip-Channel: events-project-22; filter=skip-users, user-anonymous; filter=require-sub
  Grip-Hold: stream
  Grip-Keep-Alive: event: keep-alive\ndata:\n\n; format=cstring; timeout=20
  Grip-Link: &lt;/stream-api/projects/22/feeds/?link=next&amp;recover=true&amp;es-meta=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJlcyIsImV4cCI6MTU1NTcyMTg0MCwiY2hhbm5lbHMiOlsicHJvamVjdC0yMiJdLCJ1c2VyIjoiYW5vbnltb3VzIn0.-30HrkebKMBxw7RWf_QoNnmE1baWIdID3DrHSL58Et4&gt;; rel=next
  Grip-Set-Meta: user="anonymous"
  Server: WSGIServer/0.2 CPython/3.6.7
  Vary: Cookie
  X-Frame-Options: SAMEORIGIN
  
  :
  
  event: stream-open
  data:
  </code></pre>
  
  <p>I am using Django 2.2 and Django-eventstream for server send events.</p>
  
  <p>My configuration.
  routing.py</p>
  
  <pre><code>from django.conf.urls import url
  from channels.routing import URLRouter
  from channels.http import AsgiHandler
  from channels.auth import AuthMiddlewareStack
  import django_eventstream
  
  urlpatterns = [
      #url(r'^events/', AuthMiddlewareStack(
      #   URLRouter(django_eventstream.routing.urlpatterns)
      #), {'channels': ['test']}),    
      url(r'^projects/(?P&lt;project_id&gt;[^/]+)/feeds/', AuthMiddlewareStack(
          URLRouter(django_eventstream.routing.urlpatterns)
      ), {'format-channels': ['project-{project_id}']}),
  
      url(r'', AsgiHandler),
  ]
  </code></pre>
  
  <p>urls.py</p>
  
  <pre><code>from django.urls import path, include
  import django_eventstream
  
  urlpatterns = [
      #path('events/', include(django_eventstream.urls), {'channels': ['test']}),
      path('projects/&lt;project_id&gt;/feeds/', include(django_eventstream.urls), {'format-channels': ['project-{project_id}']}),
  
  ]
  </code></pre>