Hi,
When recoveryAllowance time-out occur, you get auth_error as result code. In the above code snippet, this case is not handled. Please refer the following code snippet for better understanding:
void HelloWorld::onConnectDone(int res)
{
if (res==AppWarp::ResultCode::success)
{
// Fired when you get success in response of connect
}
else if (res==AppWarp::ResultCode::success_recovered)
{
// Fired when you get success in response of recover
}
else if (res==AppWarp::ResultCode::auth_error)
{
/* Fired when server denies your request in case of
1.user name is already in use
2.recoveryAllowance time-out
3.if user name is not valid
*/
// Here you should call connect
}
else if (res==AppWarp::ResultCode::connection_error)
{
// Fired when there is no internet
}
else if (res==AppWarp::ResultCode::connection_error_recoverable)
{
// Fired when internet get disconnected while you are playing the game
// In this case you should call recoverConnection to recover previous session
// Here you should call recoverConnection
}
else if (res==AppWarp::ResultCode::bad_request)
{
//Fired when the parameters passed to the request are invalid.
//For example if null or empty string is passed in the username parameter while calling connect.
}
else
{ }
}
I hope it will solve the problem. Let me know if problem continues.