merged fix from RC_0_16
This commit is contained in:
@@ -2157,8 +2157,14 @@ namespace aux {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// SO_REUSEADDR on windows is a bit special. It actually allows
|
||||||
|
// two active sockets to bind to the same port. That means we
|
||||||
|
// may end up binding to the same socket as some other random
|
||||||
|
// application. Don't do it!
|
||||||
|
#ifndef TORRENT_WINDOWS
|
||||||
error_code err; // ignore errors here
|
error_code err; // ignore errors here
|
||||||
s->sock->set_option(socket_acceptor::reuse_address(true), err);
|
s->sock->set_option(socket_acceptor::reuse_address(true), err);
|
||||||
|
#endif
|
||||||
|
|
||||||
#if TORRENT_USE_IPV6
|
#if TORRENT_USE_IPV6
|
||||||
if (ep.protocol() == tcp::v6())
|
if (ep.protocol() == tcp::v6())
|
||||||
|
@@ -100,9 +100,16 @@ void test_ssl(int test_idx)
|
|||||||
session ses2(fingerprint("LT", 0, 1, 0, 0), std::make_pair(49075, 50000), "0.0.0.0", 0, alert_mask);
|
session ses2(fingerprint("LT", 0, 1, 0, 0), std::make_pair(49075, 50000), "0.0.0.0", 0, alert_mask);
|
||||||
|
|
||||||
session_settings sett;
|
session_settings sett;
|
||||||
|
|
||||||
|
sett.ssl_listen = 1024 + rand() % 50000;
|
||||||
|
ses1.set_settings(sett);
|
||||||
|
|
||||||
|
if (!test.downloader_has_cert)
|
||||||
// this disables outgoing SSL connections
|
// this disables outgoing SSL connections
|
||||||
sett.ssl_listen = 0;
|
sett.ssl_listen = 0;
|
||||||
if (!test.downloader_has_cert) ses2.set_settings(sett);
|
else
|
||||||
|
sett.ssl_listen += 10;
|
||||||
|
ses2.set_settings(sett);
|
||||||
|
|
||||||
torrent_handle tor1;
|
torrent_handle tor1;
|
||||||
torrent_handle tor2;
|
torrent_handle tor2;
|
||||||
|
Reference in New Issue
Block a user