title: Django channel Error "took too long to shut down and was killed."
body: <p>I am getting this error on my console log, and on form submit it keeps loading does not post data to the server.</p>
  <blockquote>
  <pre><code>/home/Python/Working/Benutzerverwaltung/env/lib/python3.6/site-packages/channels/sessions.py:183&gt;
  wait_for=&lt;Future pending cb=[&lt;TaskWakeupMethWrapper object at
  0x7fab9fe51408&gt;()]&gt;&gt; for connection &lt;WebSocketProtocol
  client=['127.0.0.1', 59462] path=b'/ws/stream/Sales'&gt; took too long to
  shut down and was killed.
  </code></pre>
  </blockquote>
  <p>Here is my code for closing the channel.</p>
  <pre class="lang-py prettyprint-override"><code>async def disconnect(self, code):
      async_to_sync(self.channel_layer.group_discard)(
          self.room_group_name,
          self.channel
      )
      await self.close()
  
  async def websocket_disconnect(self, event):
      print(&quot;Disconnect&quot;, event)
      await self.send({
          &quot;type&quot;: &quot;websocket.close&quot;
      })
  </code></pre>
  <p>How to fix this?</p>