From 9d4ede5aff4d7ec25986c238ef34ab72a66f888a Mon Sep 17 00:00:00 2001 From: Lode Hoste Date: Tue, 5 May 2015 08:34:49 +0200 Subject: [PATCH] Capture IOException when for closed file descriptor (fixes #382) --- .../syncthingandroid/syncthing/SyncthingRunnable.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/java/com/nutomic/syncthingandroid/syncthing/SyncthingRunnable.java b/src/main/java/com/nutomic/syncthingandroid/syncthing/SyncthingRunnable.java index 7877f331..7aaab30a 100644 --- a/src/main/java/com/nutomic/syncthingandroid/syncthing/SyncthingRunnable.java +++ b/src/main/java/com/nutomic/syncthingandroid/syncthing/SyncthingRunnable.java @@ -222,10 +222,10 @@ public class SyncthingRunnable implements Runnable { new Thread(new Runnable() { @Override public void run() { - InputStreamReader isr = new InputStreamReader(is); - BufferedReader br = new BufferedReader(isr); - String line; try { + InputStreamReader isr = new InputStreamReader(is); + BufferedReader br = new BufferedReader(isr); + String line; while ((line = br.readLine()) != null) { Log.println(priority, TAG_NATIVE, line); }