summaryrefslogtreecommitdiff
path: root/app/src
diff options
context:
space:
mode:
authorcyBerta <cyberta@riseup.net>2021-10-16 12:00:23 +0200
committercyBerta <cyberta@riseup.net>2021-10-16 12:00:23 +0200
commiteeafd2b56a7996b163072e57cec549b9769ccd0d (patch)
tree5e8875b40a63f328009c4bd9631797a46e763df6 /app/src
parentfcec92a0042477347338a25cd072d622edfa03c9 (diff)
don't recompile pattern in while loop
Diffstat (limited to 'app/src')
-rw-r--r--app/src/main/java/de/blinkt/openvpn/core/OpenVPNThread.java6
1 files changed, 2 insertions, 4 deletions
diff --git a/app/src/main/java/de/blinkt/openvpn/core/OpenVPNThread.java b/app/src/main/java/de/blinkt/openvpn/core/OpenVPNThread.java
index fc77d9a5..9d307b02 100644
--- a/app/src/main/java/de/blinkt/openvpn/core/OpenVPNThread.java
+++ b/app/src/main/java/de/blinkt/openvpn/core/OpenVPNThread.java
@@ -140,6 +140,8 @@ public class OpenVPNThread implements Runnable {
InputStream in = mProcess.getInputStream();
BufferedReader br = new BufferedReader(new InputStreamReader(in));
+ // 1380308330.240114 18000002 Send to HTTP proxy: 'X-Online-Host: bla.blabla.com'
+ Pattern p = Pattern.compile("(\\d+).(\\d+) ([0-9a-f])+ (.*)");
while (true) {
String logline = br.readLine();
if (logline == null)
@@ -151,10 +153,6 @@ public class OpenVPNThread implements Runnable {
if (logline.startsWith(BROKEN_PIE_SUPPORT) || logline.contains(BROKEN_PIE_SUPPORT2))
mBrokenPie = true;
-
- // 1380308330.240114 18000002 Send to HTTP proxy: 'X-Online-Host: bla.blabla.com'
-
- Pattern p = Pattern.compile("(\\d+).(\\d+) ([0-9a-f])+ (.*)");
Matcher m = p.matcher(logline);
int logerror = 0;
if (m.matches()) {