Whenever any client looses connection, SDK waits for continuous 3 sendKeepAlive events to fail. After that it assumes the disconnection and fires onConnectDone with proper error code, in your case it will be connection_error.
If user is idle after connecting to AppWarp server then SDK sends keepAlive message to the server after every 2 seconds to tell the server, "Hey, I am alive". If sever does not receives continuous 3 keepAlives for an idle user it assumes that client is disconnected and it acts accordingly to that particular user and notify others if any.
After you receive connection_error, then you can call connect method to start a new session with server if you are not using Connection resiliency.
Please check your code as per the above explanation. If problem continues, can you please share AppWarp related code snippets or any sample where i can replicate the issue on email@example.com?