From 0a792a64d9f0ecd2029bb47e1105450abe1ee13c Mon Sep 17 00:00:00 2001 From: M66B Date: Sat, 9 Jul 2016 08:59:36 +0200 Subject: [PATCH] Usage data latency --- app/src/main/java/eu/faircode/netguard/ServiceJob.java | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/app/src/main/java/eu/faircode/netguard/ServiceJob.java b/app/src/main/java/eu/faircode/netguard/ServiceJob.java index a6d452cf..dc3c3ec7 100644 --- a/app/src/main/java/eu/faircode/netguard/ServiceJob.java +++ b/app/src/main/java/eu/faircode/netguard/ServiceJob.java @@ -97,12 +97,19 @@ public class ServiceJob extends JobService { Log.i(TAG, "Response=" + response); jobFinished(params[0], false); + } catch (Throwable ex) { Log.e(TAG, ex.toString() + "\n" + Log.getStackTraceString(ex)); jobFinished(params[0], true); + } finally { if (urlConnection != null) urlConnection.disconnect(); + + try { + Thread.sleep(1000); + } catch (InterruptedException ignored) { + } } return null;