Skip to content

WIP: Poll Tor plugin infrequently when our hidden service is reachable

akwizgran requested to merge tor-polling into master

Once our hidden service is reachable we shouldn't normally need to poll - any contacts who are currently offline will connect to our hidden service when they come online. If we lose our connection to a contact who's currently online, whichever one of us opened the connection will try to reconnect immediately.

But it's possible that some kind of network problem that isn't detected by Android's connectivity manager could cause either of these things to fail. So we still need to poll occasionally as a backup.

This branch uses a polling interval of one minute until our hidden service becomes reachable, then switches to an interval of 15 minutes as a backup in case of network problems. The interval is reset to one minute whenever we detect that we've lost connectivity. We consider our hidden service to be reachable when three copies of the descriptor have been uploaded.

The longer polling interval should save battery and bandwidth.

WIP because this needs dogfooding. Please test!

Depends on !852 (merged).

Edited by akwizgran

Merge request reports