-
Notifications
You must be signed in to change notification settings - Fork 340
Fix #645; Enhance exception handling and async update timer; #691
Conversation
This is how it looks when DoRelogin() hits:
|
Few questions before merging:
|
|
@00raq00 ToggleUpdateTimer doesn't do async things, that's why I asked. I agree that using |
async void should be avoided, because when exception or cancelation inside of them occurs, then that void just swallow it up (if i remember correctly) also, you were using ToggleUpdateTimer synchronously even if there is awaitable thing inside, which I think made problems with mapupdating concurrency. Regardless this thing was also messing with relogin, so I changed it to awaitable.
Well I thought to so too, but no. If I use
Because of the previous problem. Checking type for ApiHandledException is useless. The only thing that works here is checking for Message string
Because I needed to use it in GameClient
Ok, I can uncomment it |
That method calls 2 things inside GameClient, then updates things that are not required to be updated on relogin (on relogin player's name, level and experience don't change), so you shouldn't be calling it from GameClient. Can you please tell me why are you calling it? |
I wanted to recreate completely switch case from
and
But I wanted to be sure I am recreating Manual Login as close as possible. But I can test it with just those lines from here. |
What about this (inside the relog method maybe):
I can't test it now, but I think it can work for what you need. |
Yeah, that was the first thing I tried, but it doesn't work. Dunno why. Maybe because we are already on that page. idk |
Ok, we'll fix this later. Update because it's conflicting and then I'll merge. |
Sure. After merge I will test using only GameClient methods. |
Fix #645 by Logouting, auto-loging in again and completely reinicializing GameMapPage. Add Exception message propagation from App_UnhandledException. Change void to Task at ToggleUpdateTimer and fix all usages to await. Add link to GameMapPageViewModel into GameClient -> needs refactoring. Temporary fix for compilation error at PlayerProfilePage.xaml.cs:13
@ST-Apps Please revise the code before merging.
I tested it few times and it should work without any user interaction after those 30mins.