diff --git a/lib/std/crypto/tls/Client.zig b/lib/std/crypto/tls/Client.zig index bf6d0084f5..f46b233fb3 100644 --- a/lib/std/crypto/tls/Client.zig +++ b/lib/std/crypto/tls/Client.zig @@ -583,15 +583,16 @@ pub fn init(stream: net.Stream, ca_bundle: Certificate.Bundle, host: []const u8) }); }, }; - std.debug.print("remaining bytes: {d}\n", .{len - end}); - return .{ + var client: Client = .{ .application_cipher = app_cipher, .read_seq = 0, .write_seq = 0, .partially_read_buffer = undefined, - .partially_read_len = 0, + .partially_read_len = @intCast(u15, len - end), .eof = false, }; + mem.copy(u8, &client.partially_read_buffer, handshake_buf[len..end]); + return client; }, else => { return error.TlsUnexpectedMessage;