Skip to content

Commit 998d5a4

Browse files
committed
Cope with partial records
Trace files might be being written as we're reading them, so just stop if we get end-of-file in the middle of a record.
1 parent d6d6852 commit 998d5a4

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

fxt/read.ml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -289,6 +289,7 @@ let records r =
289289
match record t r with
290290
| None -> seq ()
291291
| Some x -> Cons (x, seq)
292+
| exception End_of_file -> Seq.Nil (* File may be being written at the same time *)
292293
)
293294
in
294295
seq

0 commit comments

Comments
 (0)