Skip to content

Commit 6ebd4fc

Browse files
committed
fix unencrypted keepalive
1 parent 4ab611d commit 6ebd4fc

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/http/client.zig

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -806,12 +806,12 @@ pub const Request = struct {
806806
log.warn(.http, "not implemented", .{ .feature = "async tls connect" });
807807
}
808808

809-
if (self._connection_from_keepalive and
810-
((self._client.isProxy() and self._proxy_secure) or (!self._client.isForwardProxy() and self._request_secure)))
811-
{
812-
// If the connection came from the keepalive pool, than we already have a TLS Connection.
813-
async_handler.conn.protocol = .{ .encrypted = .{ .conn = &connection.tls.?.nonblocking } };
814-
// and we're already connected
809+
if (self._connection_from_keepalive) {
810+
if ((self._client.isProxy() and self._proxy_secure) or (!self._client.isForwardProxy() and self._request_secure)) {
811+
// If the connection came from the keepalive pool, than we already have a TLS Connection.
812+
async_handler.conn.protocol = .{ .encrypted = .{ .conn = &connection.tls.?.nonblocking } };
813+
}
814+
// We're already connected
815815
async_handler.pending_connect = false;
816816
return async_handler.conn.connected();
817817
}

0 commit comments

Comments
 (0)