randomize proxy port to improve chances of unit tests passing
This commit is contained in:
@@ -161,10 +161,12 @@ void stop_proxy(int port)
|
||||
}
|
||||
}
|
||||
|
||||
void start_proxy(int port, int proxy_type)
|
||||
int start_proxy(int proxy_type)
|
||||
{
|
||||
using namespace libtorrent;
|
||||
|
||||
int port = 10000 + (rand() % 50000);
|
||||
|
||||
stop_proxy(port);
|
||||
|
||||
char const* type = "";
|
||||
@@ -203,6 +205,7 @@ void start_proxy(int port, int proxy_type)
|
||||
fprintf(stderr, "launched\n");
|
||||
// apparently delegate takes a while to open its listen port
|
||||
test_sleep(500);
|
||||
return port;
|
||||
}
|
||||
|
||||
using namespace libtorrent;
|
||||
|
Reference in New Issue
Block a user