summaryrefslogtreecommitdiff
path: root/src/de/blinkt/openvpn/VpnProfile.java
diff options
context:
space:
mode:
authorArne Schwabe <arne@rfc2549.org>2012-12-15 23:06:18 +0100
committerArne Schwabe <arne@rfc2549.org>2012-12-15 23:06:18 +0100
commite6bad64bdfde2be997020f22d8e5a129173140f3 (patch)
tree2b8e20d361c44f31d1270f94241baf20dd5381c6 /src/de/blinkt/openvpn/VpnProfile.java
parent5b67397a2bdd046cc05daef3ca57ef89ba794dd1 (diff)
Let the user control the new connect-retry(-max) logic
Diffstat (limited to 'src/de/blinkt/openvpn/VpnProfile.java')
-rw-r--r--src/de/blinkt/openvpn/VpnProfile.java25
1 files changed, 19 insertions, 6 deletions
diff --git a/src/de/blinkt/openvpn/VpnProfile.java b/src/de/blinkt/openvpn/VpnProfile.java
index a71758d1..98f15044 100644
--- a/src/de/blinkt/openvpn/VpnProfile.java
+++ b/src/de/blinkt/openvpn/VpnProfile.java
@@ -101,10 +101,15 @@ public class VpnProfile implements Serializable{
public boolean mUseDefaultRoutev6=true;
public String mCustomRoutesv6="";
public String mKeyPassword="";
+ public boolean mPersistTun = false;
+ public String mConnectRetryMax="5";
+ public String mConnectRetry="5";
static final String MINIVPN = "miniopenvpn";
- public boolean mPersistTun = false;
+
+
+
public void clearDefaults() {
@@ -192,11 +197,19 @@ public class VpnProfile implements Serializable{
cfg+="verb " + mVerb + "\n";
-
-
-
- // quit after 5 tries
- cfg+="connect-retry-max 5\n";
+ if(mConnectRetryMax ==null) {
+ mConnectRetryMax="5";
+ }
+
+ if(!mConnectRetryMax.equals("-1"))
+ cfg+="connect-retry-max " + mConnectRetryMax+ "\n";
+
+ if(mConnectRetry==null)
+ mConnectRetry="5";
+
+
+ cfg+="connect-retry " + mConnectRetry + "\n";
+
cfg+="resolv-retry 60\n";