tcp_pre_bind_handler returns a lib::error_code not an asio::error_code. These are sometimes the same but not always. Fix ensures that the error code types always match correctly no matter what they are. Update test suite to reflect adjusted behavior

This commit is contained in:
Peter Thorson committed 2017-09-24 10:44:21 -05:00
1 parent 7e8c8a8fad
commit c4050979c3
2 files changed
+37 -21

No files matched your search

+4 -1
View File
@@ -147,8 +147,11 @@ BOOST_AUTO_TEST_CASE( listen_after_listen_failure ) {
server1.listen(ep1, ec);
BOOST_CHECK(!ec);
// This should return some sort of problem. Usually either "pass through" or
// a more specific address in use error. It is hard to capture the full range
// of 'correctly wrong' values.
server2.listen(ep1, ec);
BOOST_REQUIRE_EQUAL(ec, make_error_code(pass_through));
BOOST_REQUIRE(ec);
server2.listen(ep2, ec);
BOOST_CHECK(!ec);