From: masensio Date: Wed, 16 Oct 2013 12:26:02 +0000 (-0700) Subject: Merge pull request #268 from owncloud/fix_fails_in_uploads_after_fall_and_rise_of_net... X-Git-Tag: oc-android-1.4.6~3 X-Git-Url: http://git.linex4red.de/pub/Android/ownCloud.git/commitdiff_plain/db1ea015619a1cc5a3886ea90dc20f910fc6dd9e?hp=e4eabcb5028bd9ab28563283184e6ffc26f157a2 Merge pull request #268 from owncloud/fix_fails_in_uploads_after_fall_and_rise_of_network_connection Fix fails in uploads after fall and rise of network connection --- diff --git a/src/com/owncloud/android/files/services/FileUploader.java b/src/com/owncloud/android/files/services/FileUploader.java index 081596c0..aa7925d1 100644 --- a/src/com/owncloud/android/files/services/FileUploader.java +++ b/src/com/owncloud/android/files/services/FileUploader.java @@ -529,6 +529,11 @@ public class FileUploader extends Service implements OnDatatransferProgressListe mPendingUploads.remove(uploadKey); Log_OC.i(TAG, "Remove CurrentUploadItem from pending upload Item Map."); } + if (uploadResult.isException()) { + // enforce the creation of a new client object for next uploads; this grant that a new socket will + // be created in the future if the current exception is due to an abrupt lose of network connection + mUploadClient = null; + } } /// notify result