y500 / libtorrent

Automatically exported from code.google.com/p/libtorrent
0 stars 0 forks source link

Downloads won't restart after VPN reconnection #713

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
I have qbittorrent user who reports that the following.
He attaches to his VPN interface. All goes well. When the VPN connection drops 
all traffic stops which is good. But when VPN connection is restored there 
isn't any traffic even after 3 hours of waiting. The only solution is to 
restart qbittorrent.

Is this a bug?
If not, can it be fixed by retrying every X minutes?

Github bug: https://github.com/qbittorrent/qBittorrent/issues/2328

Original issue reported on code.google.com by hammered...@gmail.com on 27 Dec 2014 at 10:33

GoogleCodeExporter commented 8 years ago
"He attaches to his VPN interface" Does that mean binding to a specific IP?

If so, perhaps the IP changed when the VPN is up again and it needs to be 
rebound to the new IP. What operation does qBT use to "bind to an interface"?

Original comment by arvid.no...@gmail.com on 27 Dec 2014 at 7:14

GoogleCodeExporter commented 8 years ago
qbt uses libtorrent::session::listen_on() and passes the IP of the network 
interface.
So does the local IP change on each VPN reconnect?
If yes, how should qbt detect when the traffic stops? Is there any particular 
alert from libtorrent?
Or should we somehow hook to the system and listen for any disconnect?

Original comment by hammered...@gmail.com on 27 Dec 2014 at 7:23

GoogleCodeExporter commented 8 years ago
libtorrent does not have any mechanism to help with this, as far as I know. you 
can poll or subscribe to changes to the routing table/network interfaces and if 
the device's IP changes, call listen_on() again.

in trunk there is a mechanism to specify a device name instead of an IP, 
however, libtorrent still doesn't support reacting to changes. (patches are 
welcome :P )

Original comment by arvid.no...@gmail.com on 29 Dec 2014 at 5:00

GoogleCodeExporter commented 8 years ago
Theoretically speaking if the local ip doesn't change between VPN reconnects, 
should libtorrent be able to resume transfers with any additional 
instrumentation from qbt?

Original comment by hammered...@gmail.com on 29 Dec 2014 at 5:03

GoogleCodeExporter commented 8 years ago
that is my understanding

Original comment by arvid.no...@gmail.com on 29 Dec 2014 at 5:09

GoogleCodeExporter commented 8 years ago
I think you can close this.
The user confirmed that local ip changes between reconnects. He is now trying 
to find a way to prevent that with his software.

Original comment by hammered...@gmail.com on 30 Dec 2014 at 8:02

GoogleCodeExporter commented 8 years ago

Original comment by arvid.no...@gmail.com on 30 Dec 2014 at 8:25