Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix(soap): Handle downed game server gracefully #76

Open
dantav opened this issue Oct 21, 2021 · 3 comments
Open

Fix(soap): Handle downed game server gracefully #76

dantav opened this issue Oct 21, 2021 · 3 comments

Comments

@dantav
Copy link

dantav commented Oct 21, 2021

Get POD errors when a subscriber or anyone else tries logging in while game server is down. Errors also on character view. User needs messaging that game server is under maintenance.


Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

@nicoaravena
Copy link
Collaborator

This is fixed in #86. Can you please check it @dantav?

@dantav
Copy link
Author

dantav commented Jan 22, 2022

I was thinking more of the lines of either some try/catch with api calls or something simple like this.

    public static function checkConnection()
    {
        $inst = static::I();
        $soap = $inst->getServerSoap();
        if($soap->serverInfo() == "Could not connect to host") return false;
        else return true;
    }

Then for pages that use the service calls I would do this first.

if(!ACoreServices::checkConnection())
{
    echo "<br /><h4 style='text-align: center'>Game server is under maintenance, please check back later</h4>";
}
else { 
..

There is probably a cleaner way of doing this. But the point is we need to gate service calls to check if game server is up.

@nicoaravena
Copy link
Collaborator

nicoaravena commented Jan 28, 2022

Probably is a good thing to add as an extra warning, but not as a raising error, because will cause to block access to the wp-admin view.

Feel free to propose a PR, we will be happy to get more help.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants