From 5b790130d4f46ef80f3872e924f42c4b08f0e984 Mon Sep 17 00:00:00 2001
From: akwizgran <michael@briarproject.org>
Date: Fri, 30 Mar 2018 16:33:03 +0100
Subject: [PATCH] Don't reset circuit built flag unless network is disabled.

---
 .../java/org/briarproject/bramble/plugin/tor/TorPlugin.java     | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/bramble-android/src/main/java/org/briarproject/bramble/plugin/tor/TorPlugin.java b/bramble-android/src/main/java/org/briarproject/bramble/plugin/tor/TorPlugin.java
index 73b2a39b39..e68a0e1f9f 100644
--- a/bramble-android/src/main/java/org/briarproject/bramble/plugin/tor/TorPlugin.java
+++ b/bramble-android/src/main/java/org/briarproject/bramble/plugin/tor/TorPlugin.java
@@ -778,7 +778,7 @@ class TorPlugin implements DuplexPlugin, EventHandler, EventListener {
 
 		private synchronized void enableNetwork(boolean enable) {
 			networkEnabled = enable;
-			circuitBuilt = false;
+			if (!enable) circuitBuilt = false;
 		}
 
 		private synchronized boolean isConnected() {
-- 
GitLab