summaryrefslogtreecommitdiffhomepage
path: root/https.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'https.cpp')
-rw-r--r--https.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/https.cpp b/https.cpp
index 50ea31c..7ba3b74 100644
--- a/https.cpp
+++ b/https.cpp
@@ -98,7 +98,11 @@ class session : public std::enable_shared_from_this<session>
void handle_request(::Server& server, request_type&& req)
{
+#ifdef BOOST_LATEST
beast::get_lowest_layer(stream_).expires_after(std::chrono::seconds(300)); // timeout on write by server much longer than read timeout from client
+#else
+ // beast::get_lowest_layer<tcp::socket>(stream_).expires_after(std::chrono::seconds(300)); // not supported by boost
+#endif
auto sp = std::make_shared<response_type>(generate_response(req, server));
res_ = sp;