From 3fa50f6033409f51c54c4f2e6882493bdb79b9b7 Mon Sep 17 00:00:00 2001 From: Spiros Eliopoulos Date: Wed, 6 May 2020 19:53:13 -0400 Subject: [PATCH] rm-flush-response-body: inline it --- lib/server_connection.ml | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/lib/server_connection.ml b/lib/server_connection.ml index faf1de1b..30d82156 100644 --- a/lib/server_connection.ml +++ b/lib/server_connection.ml @@ -268,15 +268,12 @@ let read t bs ~off ~len = let read_eof t bs ~off ~len = read_with_more t bs ~off ~len Complete -let flush_response_body t = - if is_active t then - let reqd = current_reqd_exn t in - Reqd.flush_response_body reqd -;; - let next_write_operation t = advance_request_queue_if_necessary t; - flush_response_body t; + if is_active t + then ( + let reqd = current_reqd_exn t in + Reqd.flush_response_body reqd); Writer.next t.writer let report_write_result t result =