Fix dangling reference in tracking_executor().

This commit is contained in:
Ivica Siladic
2023-11-30 08:34:47 +01:00
parent c18e5fc4f4
commit a5d020155f

View File

@ -28,7 +28,7 @@ void assign_tls_sni(const authority_path& ap, TlsContext& ctx, TlsStream& s);
namespace detail {
template <typename Handler, typename DfltExecutor>
auto tracking_executor(const Handler& handler, const DfltExecutor& ex) {
decltype(auto) tracking_executor(const Handler& handler, const DfltExecutor& ex) {
return asio::prefer(
asio::get_associated_executor(handler, ex),
asio::execution::outstanding_work.tracked