forked from premiere/premiere-libtorrent
Wait for i2p acceptor before announcing
This somewhat closes #1 in an ugly way
This commit is contained in:
parent
fda379729c
commit
3f2e660fcf
|
@ -397,6 +397,8 @@ namespace libtorrent
|
||||||
|
|
||||||
// The URL specified an i2p address, but no i2p router is configured
|
// The URL specified an i2p address, but no i2p router is configured
|
||||||
no_i2p_router = 160,
|
no_i2p_router = 160,
|
||||||
|
// i2p acceptor is not available yet, can't announce without endpoint
|
||||||
|
no_i2p_endpoint = 161,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -168,6 +168,9 @@ namespace libtorrent
|
||||||
#if TORRENT_USE_I2P
|
#if TORRENT_USE_I2P
|
||||||
if (i2p && tracker_req().i2pconn)
|
if (i2p && tracker_req().i2pconn)
|
||||||
{
|
{
|
||||||
|
if (tracker_req().i2pconn->local_endpoint().empty())
|
||||||
|
fail(error_code(errors::no_i2p_endpoint), -1, "Waiting for i2p acceptor from SAM bridge", 5);
|
||||||
|
else
|
||||||
url += "&ip=" + tracker_req ().i2pconn->local_endpoint () + ".i2p";
|
url += "&ip=" + tracker_req ().i2pconn->local_endpoint () + ".i2p";
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in New Issue