diff --git a/test/setup_transfer.cpp b/test/setup_transfer.cpp index 444e9b3cd..e1d7c7838 100644 --- a/test/setup_transfer.cpp +++ b/test/setup_transfer.cpp @@ -402,15 +402,17 @@ int start_proxy(int proxy_type) { using namespace libtorrent; - std::srand((unsigned int)total_microseconds(time_now() - min_time())); - int port = 5000 + (rand() % 55000); - for (std::map::iterator i = running_proxies.begin() , end(running_proxies.end()); i != end; ++i) { if (i->second.type == proxy_type) return i->first; } + unsigned int seed = total_microseconds(time_now_hires() - min_time()); + printf("random seed: %u\n", seed); + std::srand(seed); + int port = 5000 + (rand() % 55000); + char const* type = ""; char const* auth = ""; char const* cmd = "";