From d45b85cb935270f84843108dccbf849cde2d3c02 Mon Sep 17 00:00:00 2001 From: David House Date: Mon, 24 May 2021 12:16:16 +0100 Subject: [PATCH] Fix compilation of examples --- examples/async/async_echo_post.ml | 5 ++++- examples/lwt/lwt_echo_post.ml | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/examples/async/async_echo_post.ml b/examples/async/async_echo_post.ml index 0f524a2a..b0df8db5 100644 --- a/examples/async/async_echo_post.ml +++ b/examples/async/async_echo_post.ml @@ -10,7 +10,10 @@ let main port max_accepts_per_batch () = let where_to_listen = Tcp.Where_to_listen.of_port port in Tcp.(Server.create_sock ~on_handler_error:`Raise ~backlog:10_000 ~max_connections:10_000 ~max_accepts_per_batch where_to_listen) - (Server.create_connection_handler ~request_handler ~error_handler) + (Server.create_connection_handler + ~request_handler + ~error_handler + ~upgrade_handler:None) >>= fun _server -> Stdio.printf "Listening on port %i and echoing POST requests.\n" port; Stdio.printf "To send a POST request, try one of the following\n\n"; diff --git a/examples/lwt/lwt_echo_post.ml b/examples/lwt/lwt_echo_post.ml index 18307107..42d95b9f 100644 --- a/examples/lwt/lwt_echo_post.ml +++ b/examples/lwt/lwt_echo_post.ml @@ -12,7 +12,10 @@ let main port = Lwt.async (fun () -> Lwt_io.establish_server_with_client_socket listen_address - (Server.create_connection_handler ~request_handler ~error_handler) + (Server.create_connection_handler + ~request_handler + ~error_handler + ~upgrade_handler:None) >|= fun _server -> Stdio.printf "Listening on port %i and echoing POST requests.\n" port; Stdio.printf "To send a POST request, try one of the following\n\n";