瀏覽代碼

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
masensio 11 年之前
父節點
當前提交
db1ea01561
共有 1 個文件被更改,包括 5 次插入0 次删除
  1. 5 0
      src/com/owncloud/android/files/services/FileUploader.java

+ 5 - 0
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