From 5c22643808a50e0f1dc196ec262a57558b48d4b3 Mon Sep 17 00:00:00 2001 From: Romain Beauxis Date: Wed, 8 Jan 2025 16:31:03 -0600 Subject: [PATCH] Keep initial uri in request record. (#4307) --- src/core/request.ml | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/core/request.ml b/src/core/request.ml index 47d0463d45..a331dadb61 100644 --- a/src/core/request.ml +++ b/src/core/request.ml @@ -103,6 +103,7 @@ type t = { status : status Atomic.t; logger : Log.t; log : (Unix.tm * string) Queue.t; + initial_uri : string; indicators : indicator Queue.t; file_metadata : Frame.Metadata.t Atomic.t; on_air : on_air Queue.t; @@ -115,11 +116,7 @@ let last_indicator r = | el :: _ -> el | [] -> assert false -let initial_uri r = - match Queue.peek_opt r.indicators with - | Some { uri } -> uri - | None -> assert false - +let initial_uri { initial_uri } = initial_uri let status { status } = Atomic.get status let indicator ?(metadata = Frame.Metadata.empty) ?temporary s = @@ -453,6 +450,7 @@ module Pool = Pool.Make (struct logger = Log.make []; log = Queue.create (); decoders = Hashtbl.create 1; + initial_uri = ""; indicators = Queue.create (); file_metadata = Atomic.make Frame.Metadata.empty; on_air = Queue.create (); @@ -516,6 +514,7 @@ let create ?(resolve_metadata = true) ?(excluded_metadata_resolvers = []) logger = Log.make []; log = Queue.create (); decoders = Hashtbl.create 1; + initial_uri = uri; indicators = Queue.create (); file_metadata = Atomic.make Frame.Metadata.empty; on_air = Queue.create ();