Page MenuHomeWildfire Games

Stop the Xmpp client if game loading fails.

Authored by smiley on Jul 18 2018, 9:13 PM.



When game loading fails (Map error for example) the user is sent back to the main menu with an error box. This is done without stopping the xmpp client. Therefore, xmpp messsage are still recieved.

Test Plan

To reproduce: Fail a game loading (can mess up an RMS). Go to the prelobby page. Warnings would be displayed showing lobby messages.

Do the above with and without the patch.

Diff Detail

rP 0 A.D. Public Repository
Automatic diff as part of commit; lint not applicable.
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

smiley created this revision.Jul 18 2018, 9:13 PM
Owners added a subscriber: Restricted Owners Package.Jul 18 2018, 9:13 PM
Vulcan added a subscriber: Vulcan.Jul 18 2018, 9:15 PM

Successful build - Chance fights ever on the side of the prudent.

Link to build:

elexis added a subscriber: elexis.Jul 18 2018, 9:17 PM

Seems correct

86 ↗(On Diff #6811)

There's a switchpage in InitPs just before CancelLoad already, sounds like this one is redundant

smiley added inline comments.Jul 19 2018, 4:48 PM
86 ↗(On Diff #6811)

I have not investigated further but looks like the switchpage actually being used is this one. Thats just a conclusion derived after removing that line.

elexis added inline comments.Jul 19 2018, 6:01 PM
86 ↗(On Diff #6811)

Both ones are executed, I guess the former one is only relevant to not assume this one having a switchpage and in case there wasnt a GUI being setup before (autostartmode?)

elexis accepted this revision.Jul 21 2018, 2:10 PM

Thanks for the discovery and the better patch!

This revision is now accepted and ready to land.Jul 21 2018, 2:10 PM
This revision was automatically updated to reflect the committed changes.