Skip to content

Commit

Permalink
Bugfix unblock sending when the connection closes
Browse files Browse the repository at this point in the history
This allows the send_task to unblock and exit when the connection
closes. This should prevent these warnings,

    Task was destroyed but it is pending!
    task: <Task pending coro=<ProtocolWrapper.send_task() done, defined at hypercorn/protocol/__init__.py:58> wait_for=<Future pending cb=[<TaskWakeupMethWrapper object at 0x7f08fc3db1d0>()]>>
  • Loading branch information
pgjones committed Mar 3, 2020
1 parent 4b614d8 commit 1e350e4
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/hypercorn/protocol/h2.py
Expand Up @@ -346,3 +346,4 @@ async def _close_stream(self, stream_id: int) -> None:
if stream_id in self.streams:
stream = self.streams.pop(stream_id)
await stream.handle(StreamClosed(stream_id=stream_id))
await self.has_data.set()

0 comments on commit 1e350e4

Please sign in to comment.