Skip to content

Commit f59e3cd

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 94a30b2 commit f59e3cd

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
@@ -895,6 +895,10 @@ fn AsyncHandler(comptime H: type, comptime L: type) type {
895895
}
896896

897897
const status = self.conn.received(self.read_buf[0 .. self.read_pos + n]) catch |err| {
898+
if (err == error.TlsAlertCloseNotify and self.state == .handshake and self.maybeRetryRequest()) {
899+
return;
900+
}
901+
898902
self.handleError("data processing", err);
899903
return;
900904
};

0 commit comments

Comments
 (0)