Fixed timer usage inside basic_stream.

Closes #2602.
This commit is contained in:
Klemens
2022-12-23 16:54:55 +08:00
committed by Klemens Morgenstern
parent 5032a20d9d
commit 334b9871be
2 changed files with 9 additions and 2 deletions

View File

@ -68,8 +68,9 @@ struct stream<NextLayer, deflateSupported>::impl_type
impl_type>(this->detail::service::
impl_type::shared_from_this());
}
net::steady_timer timer; // used for timeouts
using executor_type = typename std::decay<NextLayer>::type::executor_type;
typename net::steady_timer::rebind_executor<executor_type>::other
timer; // used for timeouts
close_reason cr; // set from received close frame
control_cb_type ctrl_cb; // control callback

View File

@ -15,6 +15,12 @@
namespace boost {
namespace beast {
// compile test for other exec
template class basic_stream<
net::ip::tcp,
net::io_context::executor_type,
unlimited_rate_policy> ;
class tcp_stream_test
: public beast::unit_test::suite
{