Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 13 May 2019 07:56:54 +0000 (UTC)
From:      Jan Beich <jbeich@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r501527 - in head/devel/boost-libs: . files
Message-ID:  <201905130756.x4D7us8i003054@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: jbeich
Date: Mon May 13 07:56:54 2019
New Revision: 501527
URL: https://svnweb.freebsd.org/changeset/ports/501527

Log:
  devel/boost-libs: apply beast fix after r498698
  
  Fix moved-from executor in idle ping timeout:
  https://www.boost.org/patches/1_70_0/0001-beast-fix-moved-from-executor.patch

Added:
  head/devel/boost-libs/files/patch-beast-255   (contents, props changed)
Modified:
  head/devel/boost-libs/Makefile   (contents, props changed)

Modified: head/devel/boost-libs/Makefile
==============================================================================
--- head/devel/boost-libs/Makefile	Mon May 13 07:52:41 2019	(r501526)
+++ head/devel/boost-libs/Makefile	Mon May 13 07:56:54 2019	(r501527)
@@ -2,7 +2,7 @@
 # $FreeBSD$
 
 PORTNAME=	boost-libs
-PORTREVISION=	1
+PORTREVISION=	2
 
 COMMENT=	Free portable C++ libraries (without Boost.Python)
 

Added: head/devel/boost-libs/files/patch-beast-255
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/devel/boost-libs/files/patch-beast-255	Mon May 13 07:56:54 2019	(r501527)
@@ -0,0 +1,89 @@
+https://github.com/boostorg/beast/issues/1599
+https://github.com/boostorg/beast/pull/1601
+
+--- boost/beast/websocket/impl/ping.hpp.orig	2019-04-09 19:35:22 UTC
++++ boost/beast/websocket/impl/ping.hpp
+@@ -176,7 +176,8 @@ class stream<NextLayer, deflateSupported>::idle_ping_o
+                 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))
+--- libs/beast/CHANGELOG.md.orig	2019-04-09 19:35:22 UTC
++++ libs/beast/CHANGELOG.md
+@@ -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
+--- libs/beast/test/beast/websocket/ping.cpp.orig	2019-04-09 19:35:22 UTC
++++ libs/beast/test/beast/websocket/ping.cpp
+@@ -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>
+ 
+@@ -365,6 +368,46 @@ class ping_test : public websocket_test_suite (public)
+             ioc.run();
+             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};



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201905130756.x4D7us8i003054>