handle End_of_file by exiting

This commit is contained in:
Simon Cruanes 2024-10-24 12:55:57 -04:00
parent 41a6c3e306
commit 02e678cbe2
No known key found for this signature in database
GPG key ID: EBFFF6F283F3A2B4

View file

@ -390,6 +390,7 @@ module Make (IO : IO) : S with module IO = IO = struct
| Ok r -> | Ok r ->
let* () = process_msg r in let* () = process_msg r in
loop () loop ()
| Error (End_of_file, _) -> IO.return ()
| Error (e, bt) -> IO.fail e bt | Error (e, bt) -> IO.fail e bt
in in
loop () loop ()