Skip to content

Commit ea3319c

Browse files
committed
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.
1 parent 5a1ab39 commit ea3319c

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/http/client.zig

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -901,6 +901,10 @@ fn AsyncHandler(comptime H: type, comptime L: type) type {
901901
}
902902

903903
const status = self.conn.received(self.read_buf[0 .. self.read_pos + n]) catch |err| {
904+
if (err == error.TlsAlertCloseNotify and self.state == .handshake and self.maybeRetryRequest()) {
905+
return;
906+
}
907+
904908
self.handleError("data processing", err);
905909
return;
906910
};

0 commit comments

Comments
 (0)