From b715de1eb6f937b0a05d91842041a54455946061 Mon Sep 17 00:00:00 2001 From: Roland Reichwein Date: Sat, 30 May 2020 22:40:52 +0200 Subject: Bugfixes: write timeout and output size --- https.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'https.cpp') diff --git a/https.cpp b/https.cpp index e56af9a..50ea31c 100644 --- a/https.cpp +++ b/https.cpp @@ -98,6 +98,7 @@ class session : public std::enable_shared_from_this void handle_request(::Server& server, request_type&& req) { + beast::get_lowest_layer(stream_).expires_after(std::chrono::seconds(300)); // timeout on write by server much longer than read timeout from client auto sp = std::make_shared(generate_response(req, server)); res_ = sp; @@ -225,7 +226,7 @@ public: &session::on_read, shared_from_this())); #else - http::async_read(stream_, buffer_, *parser_, + http::async_read(stream_, buffer_, *parser_, boost::asio::bind_executor( strand_, std::bind( -- cgit v1.2.3