Skip to content

Commit

Permalink
Fix compilation with latest eio
Browse files Browse the repository at this point in the history
  • Loading branch information
andersfugmann committed Jan 17, 2023
1 parent 18d06e1 commit 31ee23e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/connection.ml
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ let receive_messages ~set_close_reason flow channels =
loop ()
with
| End_of_file
| Eio.Net.Connection_reset _ ->
| Eio.Io (Eio.Net.E Connection_reset _, _) ->
let exn = set_close_reason (Closed "Connection lost") in
Eio.traceln ~__POS__ "Connection lost: %s" (Printexc.to_string exn);
Stream.close (Option.get channels.(0) |> fst) exn
Expand All @@ -280,7 +280,7 @@ let send_messages ~set_close_reason flow send_stream =
loop ()
with
| End_of_file
| Eio.Net.Connection_reset _ ->
| Eio.Io (Eio.Net.E Connection_reset _, _) ->
let exn = set_close_reason (Closed "Connection lost") in
Eio.traceln ~__POS__ "Connection closed: %s" (Printexc.to_string exn);
Stream.close send_stream exn
Expand Down

0 comments on commit 31ee23e

Please sign in to comment.