diff --git a/src/beast/modules/beast_asio/tests/TestPeerLogicAsyncClient.cpp b/src/beast/modules/beast_asio/tests/TestPeerLogicAsyncClient.cpp index 0b6f5852331..f6a4b339adc 100644 --- a/src/beast/modules/beast_asio/tests/TestPeerLogicAsyncClient.cpp +++ b/src/beast/modules/beast_asio/tests/TestPeerLogicAsyncClient.cpp @@ -108,7 +108,7 @@ void TestPeerLogicAsyncClient::on_read_final (error_code const& ec, std::size_t) { // on_shutdown will call finished () error_code ec; - on_shutdown (socket ().shutdown (Socket::shutdown_both, ec)); + on_shutdown (socket ().shutdown (Socket::shutdown_send, ec)); } } else @@ -137,7 +137,7 @@ void TestPeerLogicAsyncClient::on_shutdown (error_code const& ec) { if (socket ().needs_handshake ()) { - socket ().shutdown (Socket::shutdown_both, error ()); + socket ().shutdown (Socket::shutdown_send, error ()); } if (! error ()) diff --git a/src/beast/modules/beast_asio/tests/TestPeerLogicAsyncServer.cpp b/src/beast/modules/beast_asio/tests/TestPeerLogicAsyncServer.cpp index c290b541352..8fbf38a397c 100644 --- a/src/beast/modules/beast_asio/tests/TestPeerLogicAsyncServer.cpp +++ b/src/beast/modules/beast_asio/tests/TestPeerLogicAsyncServer.cpp @@ -90,7 +90,7 @@ void TestPeerLogicAsyncServer::on_write (error_code const& ec, std::size_t bytes // on_shutdown will call finished () // we need another instance of ec so we can call on_shutdown() error_code ec; - on_shutdown (socket ().shutdown (Socket::shutdown_both, ec)); + on_shutdown (socket ().shutdown (Socket::shutdown_receive, ec)); } } @@ -102,7 +102,7 @@ void TestPeerLogicAsyncServer::on_shutdown (error_code const& ec) { if (socket ().needs_handshake ()) { - socket ().shutdown (Socket::shutdown_both, error ()); + socket ().shutdown (Socket::shutdown_receive, error ()); } if (success (socket ().close (error ()))) diff --git a/src/beast/modules/beast_asio/tests/TestPeerLogicSyncClient.cpp b/src/beast/modules/beast_asio/tests/TestPeerLogicSyncClient.cpp index 4fa98893a2d..eb187c86607 100644 --- a/src/beast/modules/beast_asio/tests/TestPeerLogicSyncClient.cpp +++ b/src/beast/modules/beast_asio/tests/TestPeerLogicSyncClient.cpp @@ -94,9 +94,10 @@ void TestPeerLogicSyncClient::on_connect () { if (failure (socket ().shutdown (error ()), true)) return; + error () = error_code (); } - if (failure (socket ().shutdown (Socket::shutdown_both, error ()))) + if (failure (socket ().shutdown (Socket::shutdown_send, error ()))) return; if (failure (socket ().close (error ()))) diff --git a/src/beast/modules/beast_asio/tests/TestPeerLogicSyncServer.cpp b/src/beast/modules/beast_asio/tests/TestPeerLogicSyncServer.cpp index a1358c83f95..cb64f3df3b4 100644 --- a/src/beast/modules/beast_asio/tests/TestPeerLogicSyncServer.cpp +++ b/src/beast/modules/beast_asio/tests/TestPeerLogicSyncServer.cpp @@ -72,7 +72,7 @@ void TestPeerLogicSyncServer::on_connect () return; } - if (failure (socket ().shutdown (Socket::shutdown_both, error ()))) + if (failure (socket ().shutdown (Socket::shutdown_send, error ()))) return; if (failure (socket ().close (error ())))