forked from pool/boost
- Update to version 1.70.0 Breaking changes: * beast - there were many API changes. For details, see upstream release notes New libraries: * outcome: A set of tools for reporting and handling function failures in contexts where directly using exception handling is unsuitable * histogram: Fast and extensible multi-dimensional histograms Updated libraries: * asio, beast, context, coroutine2, dynamic bitset, fiber, filesystem, integer, log, math, mp11, multi-index containers, multiprecision, polycollection, spirit, stacktrace, test, typeindex, typetraits, variant and ublas. For detailed changes see https://www.boost.org/users/history/version_1_70_0.html - 0001-beast-fix-moved-from-executor.patch: upstream patch to fix regresion - boost-rpmoptflags-only.patch: refresh but don't disable all extra warnings - dynamic_linking.patch: refreshed - baselibs.conf - updated to 1.70.0 OBS-URL: https://build.opensuse.org/request/show/702030 OBS-URL: https://build.opensuse.org/package/show/devel:libraries:c_c++/boost?expand=0&rev=231
90 lines
3.2 KiB
Diff
90 lines
3.2 KiB
Diff
diff -Naur a/boost/beast/websocket/impl/ping.hpp b/boost/beast/websocket/impl/ping.hpp
|
|
--- a/boost/beast/websocket/impl/ping.hpp 2019-05-06 22:01:43.435117251 -0400
|
|
+++ b/boost/beast/websocket/impl/ping.hpp 2019-05-06 22:02:37.949433556 -0400
|
|
@@ -176,7 +176,8 @@
|
|
impl.op_idle_ping.emplace(std::move(*this));
|
|
impl.wr_block.lock(this);
|
|
BOOST_ASIO_CORO_YIELD
|
|
- net::post(this->get(), std::move(*this));
|
|
+ net::post(
|
|
+ this->get_executor(), std::move(*this));
|
|
BOOST_ASSERT(impl.wr_block.is_locked(this));
|
|
}
|
|
if(impl.check_stop_now(ec))
|
|
diff -Naur a/libs/beast/CHANGELOG.md b/libs/beast/CHANGELOG.md
|
|
--- a/libs/beast/CHANGELOG.md 2019-05-06 22:02:54.332528615 -0400
|
|
+++ b/libs/beast/CHANGELOG.md 2019-05-06 22:03:05.896595711 -0400
|
|
@@ -1,3 +1,10 @@
|
|
+Version 248-hf1:
|
|
+
|
|
+* Add idle ping suspend test
|
|
+* Fix moved-from executor in idle ping timeout
|
|
+
|
|
+--------------------------------------------------------------------------------
|
|
+
|
|
Version 248:
|
|
|
|
* Don't use a moved-from handler
|
|
diff -Naur a/libs/beast/test/beast/websocket/ping.cpp b/libs/beast/test/beast/websocket/ping.cpp
|
|
--- a/libs/beast/test/beast/websocket/ping.cpp 2019-05-06 22:02:54.342528673 -0400
|
|
+++ b/libs/beast/test/beast/websocket/ping.cpp 2019-05-06 22:03:05.908595781 -0400
|
|
@@ -10,8 +10,11 @@
|
|
// Test that header file is self-contained.
|
|
#include <boost/beast/websocket/stream.hpp>
|
|
|
|
+#include <boost/beast/_experimental/test/tcp.hpp>
|
|
+
|
|
#include "test.hpp"
|
|
|
|
+#include <boost/asio/ip/tcp.hpp>
|
|
#include <boost/asio/io_context.hpp>
|
|
#include <boost/asio/strand.hpp>
|
|
|
|
@@ -366,6 +369,46 @@
|
|
BEAST_EXPECT(count == 3);
|
|
});
|
|
|
|
+ // suspend idle ping
|
|
+ {
|
|
+ using socket_type =
|
|
+ net::basic_stream_socket<
|
|
+ net::ip::tcp,
|
|
+ net::executor>;
|
|
+ net::io_context ioc;
|
|
+ stream<socket_type> ws1(ioc);
|
|
+ stream<socket_type> ws2(ioc);
|
|
+ ws1.set_option(stream_base::timeout{
|
|
+ stream_base::none(),
|
|
+ std::chrono::seconds(0),
|
|
+ true});
|
|
+ test::connect(
|
|
+ ws1.next_layer(),
|
|
+ ws2.next_layer());
|
|
+ ws1.async_handshake("localhost", "/",
|
|
+ [](error_code){});
|
|
+ ws2.async_accept([](error_code){});
|
|
+ ioc.run();
|
|
+ ioc.restart();
|
|
+ flat_buffer b1;
|
|
+ auto mb = b1.prepare(65536);
|
|
+ std::memset(mb.data(), 0, mb.size());
|
|
+ b1.commit(65536);
|
|
+ ws1.async_write(b1.data(),
|
|
+ [&](error_code, std::size_t){});
|
|
+ BEAST_EXPECT(
|
|
+ ws1.impl_->wr_block.is_locked());
|
|
+ ws1.async_read_some(net::mutable_buffer{},
|
|
+ [&](error_code, std::size_t){});
|
|
+ ioc.run();
|
|
+ ioc.restart();
|
|
+ flat_buffer b2;
|
|
+ ws2.async_read(b2,
|
|
+ [&](error_code, std::size_t){});
|
|
+ ioc.run();
|
|
+ }
|
|
+ //);
|
|
+
|
|
{
|
|
echo_server es{log, kind::async};
|
|
net::io_context ioc;
|