From f59e3cd4dac384a9fda01f489f2bca1e33f7f734 Mon Sep 17 00:00:00 2001 From: Karl Seguin Date: Wed, 21 May 2025 19:10:24 +0800 Subject: [PATCH] Maybe retry on TlsAlertCloseNotify error This might not be specific to network notification, but the issue happens all the time testing scenarios that rely on network notification, so it's hard to ignore. --- src/http/client.zig | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/http/client.zig b/src/http/client.zig index 48ee2a14..ab8a139f 100644 --- a/src/http/client.zig +++ b/src/http/client.zig @@ -895,6 +895,10 @@ fn AsyncHandler(comptime H: type, comptime L: type) type { } const status = self.conn.received(self.read_buf[0 .. self.read_pos + n]) catch |err| { + if (err == error.TlsAlertCloseNotify and self.state == .handshake and self.maybeRetryRequest()) { + return; + } + self.handleError("data processing", err); return; };