-
Notifications
You must be signed in to change notification settings - Fork 184
Closed
Milestone
Description
I have been running an opium server on FreeBSD, and it failed with ECONNABORTED in Lwt_unix.accept. It seems Lwt_io.establish_server_generic doesn't handle this error as well.
Lines 1598 to 1627 in 0985a5b
| let rec accept_loop () = | |
| let try_to_accept = | |
| Lwt_unix.accept listening_socket >|= fun x -> | |
| `Accepted x | |
| in | |
| Lwt.pick [try_to_accept; should_stop] >>= function | |
| | `Accepted (client_socket, client_address) -> | |
| begin | |
| try Lwt_unix.set_close_on_exec client_socket | |
| with Invalid_argument _ -> () | |
| end; | |
| connection_handler_callback client_address client_socket; | |
| accept_loop () | |
| | `Should_stop -> | |
| Lwt_unix.close listening_socket >>= fun () -> | |
| begin match listening_address with | |
| | Unix.ADDR_UNIX path when path <> "" && path.[0] <> '\x00' -> | |
| Unix.unlink path | |
| | _ -> | |
| () | |
| end [@ocaml.warning "-4"]; | |
| Lwt.wakeup_later notify_listening_socket_closed (); | |
| Lwt.return_unit | |
| in |
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels