From ea271933e933361312be9af36f1e2244099be0d8 Mon Sep 17 00:00:00 2001 From: Vito Rifino Date: Sat, 17 Oct 2015 11:34:32 +0300 Subject: [PATCH] CB-8431 File Transfer tests crash on Android Lolipop github: close #79 --- src/android/FileTransfer.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/android/FileTransfer.java b/src/android/FileTransfer.java index 610ffe9..c296ddb 100644 --- a/src/android/FileTransfer.java +++ b/src/android/FileTransfer.java @@ -1011,7 +1011,11 @@ public class FileTransfer extends CordovaPlugin { context.sendPluginResult(new PluginResult(PluginResult.Status.ERROR, error)); context.aborted = true; if (context.connection != null) { - context.connection.disconnect(); + try { + context.connection.disconnect(); + } catch (Exception e) { + Log.e(LOG_TAG, "CB-8431 Catch workaround for fatal exception", e); + } } } }