catch all exceptions when closing closable

This commit is contained in:
Daniel Gultsch 2019-10-23 22:34:25 +02:00
parent 2f59d66fd1
commit ab516299e7
1 changed files with 4 additions and 1 deletions

View File

@ -356,7 +356,8 @@ public class FileBackend {
if (stream != null) { if (stream != null) {
try { try {
stream.close(); stream.close();
} catch (IOException e) { } catch (Exception e) {
Log.d(Config.LOGTAG, "unable to close stream", e);
} }
} }
} }
@ -366,6 +367,7 @@ public class FileBackend {
try { try {
socket.close(); socket.close();
} catch (IOException e) { } catch (IOException e) {
Log.d(Config.LOGTAG, "unable to close socket", e);
} }
} }
} }
@ -375,6 +377,7 @@ public class FileBackend {
try { try {
socket.close(); socket.close();
} catch (IOException e) { } catch (IOException e) {
Log.d(Config.LOGTAG, "unable to close server socket", e);
} }
} }
} }