From 7a066bf9b5f25800e3f41bc3ecbcc079e9cce300 Mon Sep 17 00:00:00 2001 From: Felix Bechstein Date: Sat, 10 Oct 2009 13:31:08 +0200 Subject: [PATCH] try this --- src/de/ub0r/android/adBlock/Proxy.java | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/src/de/ub0r/android/adBlock/Proxy.java b/src/de/ub0r/android/adBlock/Proxy.java index 4f6f272..098b27e 100644 --- a/src/de/ub0r/android/adBlock/Proxy.java +++ b/src/de/ub0r/android/adBlock/Proxy.java @@ -224,14 +224,19 @@ public class Proxy extends Service implements Runnable { URL ret = null; String[] strings; // read first line + /* while (!reader.ready() && this.state != STATE_CLOSED_OUT) { - try { // isConnected does not work :/ - Thread.sleep(SLEEP); - } catch (InterruptedException e) { - Log.e(TAG, null, e); + if (this.local.isConnected() { + try { // isConnected does not work :/ + Thread.sleep(SLEEP); + } catch (InterruptedException e) { + Log.e(TAG, null, e); + } + } else { + this.state = STATE_CLOSED_OUT; } } - this.firstRun = false; + */ if (this.state == STATE_CLOSED_OUT) { return null; } -- 2.11.4.GIT