Skip to content

Commit

Permalink
Don't check the internal close_at with QUIC
Browse files Browse the repository at this point in the history
Better to handle the timer every time. With thanks to @rthalley.
  • Loading branch information
pgjones committed May 27, 2024
1 parent 116bd8c commit ba3d813
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/hypercorn/protocol/quic.py
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,5 @@ async def _handle_events(
async def _handle_timer(self, timer: float, connection: _Connection) -> None:
wait = max(0, timer - self.context.time())
await self.context.sleep(wait)
if connection.quic._close_at is not None:
connection.quic.handle_timer(now=self.context.time())
await self._handle_events(connection, None)
connection.quic.handle_timer(now=self.context.time())
await self._handle_events(connection, None)

0 comments on commit ba3d813

Please sign in to comment.