diff --git a/test/setup_transfer.cpp b/test/setup_transfer.cpp index b58a19799..dbb93be10 100644 --- a/test/setup_transfer.cpp +++ b/test/setup_transfer.cpp @@ -385,14 +385,15 @@ int start_proxy(int proxy_type) { using namespace libtorrent; + static int port = 5000 + (rand() % 55000); + ++port; + for (std::map::iterator i = running_proxies.begin() , end(running_proxies.end()); i != end; ++i) { if (i->second.type == proxy_type) return i->first; } - int port = 10000 + (rand() % 50000); - char const* type = ""; char const* auth = ""; char const* cmd = "";