make tests not depend on exceptions

This commit is contained in:
Arvid Norberg
2008-11-05 03:17:41 +00:00
parent 19660306e0
commit c6b793021d
10 changed files with 88 additions and 65 deletions

View File

@@ -309,7 +309,8 @@ setup_transfer(session* ses1, session* ses2, session* ses3
if (connect_peers)
{
std::cerr << "connecting peer\n";
tor1.connect_peer(tcp::endpoint(address::from_string("127.0.0.1")
error_code ec;
tor1.connect_peer(tcp::endpoint(address::from_string("127.0.0.1", ec)
, ses2->listen_port()));
if (ses3)
@@ -317,10 +318,10 @@ setup_transfer(session* ses1, session* ses2, session* ses3
// give the other peers some time to get an initial
// set of pieces before they start sharing with each-other
tor3.connect_peer(tcp::endpoint(
address::from_string("127.0.0.1")
address::from_string("127.0.0.1", ec)
, ses2->listen_port()));
tor3.connect_peer(tcp::endpoint(
address::from_string("127.0.0.1")
address::from_string("127.0.0.1", ec)
, ses1->listen_port()));
}
}