Fixed another of the same bug in UsergridClient

Project: http://git-wip-us.apache.org/repos/asf/usergrid-swift/repo
Commit: http://git-wip-us.apache.org/repos/asf/usergrid-swift/commit/6c1f3fe4
Tree: http://git-wip-us.apache.org/repos/asf/usergrid-swift/tree/6c1f3fe4
Diff: http://git-wip-us.apache.org/repos/asf/usergrid-swift/diff/6c1f3fe4

Branch: refs/heads/master
Commit: 6c1f3fe4db9f24fc31ed7e19cab98299070bd38b
Parents: 0869e82
Author: Robert Walsh <[email protected]>
Authored: Fri Sep 16 16:01:49 2016 -0500
Committer: Robert Walsh <[email protected]>
Committed: Fri Sep 16 16:01:49 2016 -0500

----------------------------------------------------------------------
 Source/UsergridClient.swift | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/usergrid-swift/blob/6c1f3fe4/Source/UsergridClient.swift
----------------------------------------------------------------------
diff --git a/Source/UsergridClient.swift b/Source/UsergridClient.swift
index 24bc7aa..7cb3a14 100644
--- a/Source/UsergridClient.swift
+++ b/Source/UsergridClient.swift
@@ -162,7 +162,9 @@ public class UsergridClient: NSObject, NSCoding {
                 self.currentUser = 
UsergridUser.getCurrentUserFromKeychain(self)
             }
         }
-        UsergridDevice.sharedDevice.save(self)
+        DispatchQueue.global().async {
+            UsergridDevice.sharedDevice.save(self)
+        }
     }
 
     /**

Reply via email to