From: David A. Velasco Date: Tue, 1 Oct 2013 10:56:20 +0000 (+0200) Subject: Granted creation of a new client object (with a new socket) when the network connecti... X-Git-Tag: oc-android-1.4.6~3^2 X-Git-Url: http://git.linex4red.de/pub/Android/ownCloud.git/commitdiff_plain/b5d86aa9defd685d97459dfc6224d820be4ceb7a?ds=inline Granted creation of a new client object (with a new socket) when the network connection is lost --- diff --git a/src/com/owncloud/android/files/services/FileUploader.java b/src/com/owncloud/android/files/services/FileUploader.java index 0f1e9cdb..06d834fd 100644 --- a/src/com/owncloud/android/files/services/FileUploader.java +++ b/src/com/owncloud/android/files/services/FileUploader.java @@ -78,7 +78,6 @@ import com.owncloud.android.ui.activity.FileDisplayActivity; import com.owncloud.android.ui.activity.InstantUploadActivity; import com.owncloud.android.ui.preview.PreviewImageActivity; import com.owncloud.android.ui.preview.PreviewImageFragment; -import com.owncloud.android.utils.FileStorageUtils; import eu.alefzero.webdav.WebdavClient; @@ -529,6 +528,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