diff --git a/AndroidAsync/src/com/koushikdutta/async/http/cache/ResponseCacheMiddleware.java b/AndroidAsync/src/com/koushikdutta/async/http/cache/ResponseCacheMiddleware.java index 614ba40b9..a624408ac 100644 --- a/AndroidAsync/src/com/koushikdutta/async/http/cache/ResponseCacheMiddleware.java +++ b/AndroidAsync/src/com/koushikdutta/async/http/cache/ResponseCacheMiddleware.java @@ -425,7 +425,12 @@ public void run() { void spewInternal() { if (pending.remaining() > 0) { - super.onDataAvailable(CachedBodyEmitter.this, pending); + try{ + super.onDataAvailable(CachedBodyEmitter.this, pending); + }catch(RuntimeException e){ + pending.recycle(); + return; + } if (pending.remaining() > 0) return; }