Skip to content

Commit

Permalink
Keep initial uri in request record.
Browse files Browse the repository at this point in the history
  • Loading branch information
toots committed Jan 8, 2025
1 parent cde4dad commit 13a301c
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions src/core/request.ml
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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 =
Expand Down Expand Up @@ -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 ();
Expand Down Expand Up @@ -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 ();
Expand Down

0 comments on commit 13a301c

Please sign in to comment.