I've got a port-forwarding app which generates a single TorClientEndpoint for the target, then calls .connect() each time a client connects. This works the first time, but the second (and subsequent) call fails.
It turns out that TorClientEndpoint is replacing the list of potential SOCKS ports (socks_ports_to_try) with an iterator, in the constructor. So each call to .connect() will consume some members of this list, leaving no working ports for later calls.
I'll submit a PR that removes this iterator, leaving .connect() to just loop over the original list.
I've got a port-forwarding app which generates a single TorClientEndpoint for the target, then calls
.connect()
each time a client connects. This works the first time, but the second (and subsequent) call fails.It turns out that TorClientEndpoint is replacing the list of potential SOCKS ports (
socks_ports_to_try
) with an iterator, in the constructor. So each call to.connect()
will consume some members of this list, leaving no working ports for later calls.I'll submit a PR that removes this iterator, leaving
.connect()
to just loop over the original list.