I2P Address: [http://git.idk.i2p]

Skip to content
Snippets Groups Projects
Commit cf5454d4 authored by zzz's avatar zzz
Browse files

rcvr tweaks

parent e94c332e
No related branches found
No related tags found
No related merge requests found
...@@ -57,14 +57,21 @@ public class I2PReceiver extends BroadcastReceiver { ...@@ -57,14 +57,21 @@ public class I2PReceiver extends BroadcastReceiver {
if (action.equals(ConnectivityManager.CONNECTIVITY_ACTION) || if (action.equals(ConnectivityManager.CONNECTIVITY_ACTION) ||
action.equals(Intent.ACTION_TIME_TICK)) { action.equals(Intent.ACTION_TIME_TICK)) {
if (_wasConnected && !isConnected()) { boolean connected = isConnected();
if (_wasConnected && !connected) {
// notify + 2 timer ticks // notify + 2 timer ticks
if (++_unconnectedCount >= 3) { if (++_unconnectedCount >= 3) {
// connection will call networkStop() if (_isBound) {
System.err.println("********* Network down, binding to router"); System.err.println("********* Network down, already bound");
bindRouter(); _routerService.networkStop();
} else {
System.err.println("********* Network down, binding to router");
// connection will call networkStop()
bindRouter();
}
} }
} else { } else {
_wasConnected = connected;
_unconnectedCount = 0; _unconnectedCount = 0;
} }
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment