Skip to content

Commit 4bb311b

Browse files
committed
Merge branch 'issue-89-test-stream-cancellation-support' of github.com:MungoG/beast2 into issue-89-test-stream-cancellation-support
2 parents 716d145 + df5c70b commit 4bb311b

File tree

3 files changed

+9
-7
lines changed

3 files changed

+9
-7
lines changed

include/boost/beast2/test/impl/stream.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ class basic_stream<Executor>::read_op : public detail::stream_op_base
178178
base::wg2_.get_executor(),
179179
asio::append(std::move(base::h_), ec, bytes_transferred));
180180
base::wg2_.reset();
181-
sp->rop.release();
181+
sp->rop.reset(nullptr);
182182
}
183183

184184
template<class Handler_>
@@ -260,7 +260,7 @@ class basic_stream<Executor>::write_op : public detail::stream_op_base
260260
base::wg2_.get_executor(),
261261
asio::append(std::move(base::h_), ec, bytes_transferred));
262262
base::wg2_.reset();
263-
isp->wop.release();
263+
isp->wop.reset(nullptr);
264264
}
265265

266266
template<class Handler_>

test/unit/CMakeLists.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,9 @@
77
# Official repository: https://github.com/cppalliance/beast2
88
#
99

10-
add_subdirectory(../../../url/extra/test_suite test_suite)
10+
if(NOT TARGET boost_url_test_suite)
11+
add_subdirectory(../../../url/extra/test_suite test_suite)
12+
endif()
1113

1214
file(GLOB_RECURSE PFILES CONFIGURE_DEPENDS *.cpp *.hpp)
1315
list(APPEND PFILES

test/unit/write.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -165,10 +165,10 @@ class write_test
165165

166166
// async_write_some cancellation
167167
{
168-
boost::array<asio::cancellation_type, 3> ctypes(
168+
boost::array<asio::cancellation_type, 3> ctypes{
169169
{ asio::cancellation_type::total,
170170
asio::cancellation_type::partial,
171-
asio::cancellation_type::terminal });
171+
asio::cancellation_type::terminal }};
172172

173173
for(auto ctype : ctypes)
174174
{
@@ -270,10 +270,10 @@ class write_test
270270

271271
// async_write cancellation
272272
{
273-
boost::array<asio::cancellation_type, 3> ctypes(
273+
boost::array<asio::cancellation_type, 3> ctypes{
274274
{ asio::cancellation_type::total,
275275
asio::cancellation_type::partial,
276-
asio::cancellation_type::terminal });
276+
asio::cancellation_type::terminal }};
277277

278278
for(auto ctype : ctypes)
279279
{

0 commit comments

Comments
 (0)