diff options
author | cyBerta <cyberta@riseup.net> | 2021-10-16 12:00:23 +0200 |
---|---|---|
committer | cyBerta <cyberta@riseup.net> | 2021-10-16 12:00:23 +0200 |
commit | eeafd2b56a7996b163072e57cec549b9769ccd0d (patch) | |
tree | 5e8875b40a63f328009c4bd9631797a46e763df6 /app/src | |
parent | fcec92a0042477347338a25cd072d622edfa03c9 (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.java | 6 |
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()) { |