User logs out very fast / User doesn't stay live for long, disconnects frequently

+1 vote
   I am using simple AppWarp connect user function to connect an user, it does connects, but the connection doesn't stay for long, and it disconnects, and this is so frequent that I am not able to test anything, and is frustrating a lot.. I have written a recovery code too, which tries to connect if connection fails and recoverable, but at some point of time, it never connects and throws failed due to unknown reason. I am not able to figure out the reason behind.
 

Is there anything I am missing?

 
I have found a macro defined as
#define CLIENT_KEEP_ALIVE_TIME_INTERVAL 2  //In second
I changed the value to 2000 to check the effect , it didn't work, it continues to fail always, I have been trying this for 2 days, but the connection is never alive, so that I test my logic.. And too I have seen when I try to connect another user in different instance while a user is already connected disconnection is much more frequent.
 
I need urgent help on this, I am thinking to opt out from appwarp if this doesn't solve, please help.
closed with the note: Closing this thread as there was no update from last 2 Weeks or more. Please raise a new query if problem persists.
asked Feb 6, 2015 in AppWarp by Hussain Fakhruddin (15 points)
closed Aug 17, 2015 by sushil
I am using the following code for connection.


 void GameEngine::connectToAppWarp(std::string username,const engineConnectedCallback& callback)
{

    if(callback)

        _userConnectedCallback=callback;

    if(!isConnected){

        warpClientRef->setRecoveryAllowance(120);

        warpClientRef->setConnectionRequestListener(_sharedGameEngine);

        warpClientRef->setNotificationListener(_sharedGameEngine);

        warpClientRef->setRoomRequestListener(_sharedGameEngine);

        warpClientRef->setZoneRequestListener(_sharedGameEngine);

        warpClientRef->setChatRequestListener(_sharedGameEngine);

        warpClientRef->connect(username);

    }else{

        warpClientRef->connect(username);

    }

}

void GameEngine::onConnectDone(int res, int reasonCode)
{

    if (res==AppWarp::ResultCode::success)

    {

        if(!isConnected){

            warpClientRef->joinRoom(GameConfig::appwrap_room_id);

            isConnected=true;

        }

    }

    else if (res==AppWarp::ResultCode::success_recovered)

    {

        //call the callback only if user was not connected, if connected and trying to recover.. keep as it is..

        if(!isConnected){

            if(_userConnectedCallback){

                _userConnectedCallback(NULL,failed);

            }

        }

    }

    else if (res==AppWarp::ResultCode::connection_error_recoverable)

    {
        if(!isConnected){

            if(_userConnectedCallback){

                _userConnectedCallback(NULL,failed);

            }

        }else

            connectToAppWarp(GameConfig::getUsername(), _userConnectedCallback);
    }

    else if (res==AppWarp::ResultCode::bad_request)

    {

        if(!isConnected){

            if(_userConnectedCallback){

                _userConnectedCallback(NULL,failed);

            }

        }else

            connectToAppWarp(GameConfig::getUsername(), _userConnectedCallback);
    }

    else

    {

        if(!isConnected){

            if(_userConnectedCallback){

                _userConnectedCallback(NULL,failed);

            }

        }else

            connectToAppWarp(GameConfig::getUsername(), _userConnectedCallback);

    }

}
As we had the conversation on email, we are waiting for your developer to send us logs. Once we found the solution we will post it here too, as it will also help other developers
Download Widgets
Welcome to ShepHertz Product line forum, where you can ask questions and receive answers from the community. You can also reach out to us on support@shephertz.com
...