From ba3d813684e8b8076d295f9a23778a39cdb9b470 Mon Sep 17 00:00:00 2001 From: pgjones Date: Mon, 27 May 2024 16:19:48 +0100 Subject: [PATCH] Don't check the internal close_at with QUIC Better to handle the timer every time. With thanks to @rthalley. --- src/hypercorn/protocol/quic.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/hypercorn/protocol/quic.py b/src/hypercorn/protocol/quic.py index 98bd8b48..a5522bd6 100644 --- a/src/hypercorn/protocol/quic.py +++ b/src/hypercorn/protocol/quic.py @@ -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)