diff --git a/unity-project/Assets/Moulin/DDP/account/DdpAccount.cs b/unity-project/Assets/Moulin/DDP/account/DdpAccount.cs index a29a6c4..719ec1a 100644 --- a/unity-project/Assets/Moulin/DDP/account/DdpAccount.cs +++ b/unity-project/Assets/Moulin/DDP/account/DdpAccount.cs @@ -114,8 +114,13 @@ public IEnumerator ResumeSession(string token) { public IEnumerator Logout() { MethodCall logoutCall = connection.Call("logout"); - yield return logoutCall.WaitForResult(); + + if (logoutCall.error != null) { + throw new InvalidOperationException("Logout Error! Try Again!"); + } + HandleLogoutResult(logoutCall); + yield return logoutCall.WaitForResult(); } }