From 9992701a4a97d23247efca0d972a5fd9c25cff31 Mon Sep 17 00:00:00 2001 From: Eelis van der Weegen Date: Sun, 3 Mar 2019 22:25:48 +0100 Subject: [PATCH] Fix ubsan false positive: * Avoid calling stream() on partially constructed object. Fixes #1495, fix #1496 --- include/boost/beast/websocket/impl/stream_impl.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/boost/beast/websocket/impl/stream_impl.hpp b/include/boost/beast/websocket/impl/stream_impl.hpp index 8f6ef050..fca1b84a 100644 --- a/include/boost/beast/websocket/impl/stream_impl.hpp +++ b/include/boost/beast/websocket/impl/stream_impl.hpp @@ -130,8 +130,8 @@ struct stream::impl_type boost::empty_init_t{}, std::forward(args)...) , detail::service::impl_type( - this->stream().get_executor().context()) - , timer(this->stream().get_executor()) + this->boost::empty_value::get().get_executor().context()) + , timer(this->boost::empty_value::get().get_executor()) { timeout_opt.handshake_timeout = none(); timeout_opt.idle_timeout = none();