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

Potential fix for #3637 / race condition sitemap vs events #3639

Merged
merged 4 commits into from
Apr 11, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -425,10 +425,15 @@ class PageConnectionHolderFragment : Fragment(), CoroutineScope {
}
}
seime marked this conversation as resolved.
Show resolved Hide resolved

// Either we didn't find the widget (possibly because the server didn't give us invisible widgets),
// or we couldn't update it because we couldn't trust the data, so reload the page
cancel()
load()
if(lastWidgetList == null) {
Log.d(TAG, "Ignoring update event as lastWidgetList is null - sitemap not fully loaded?");
return;
} else {
// Either we didn't find the widget (possibly because the server didn't give us invisible widgets),
// or we couldn't update it because we couldn't trust the data, so reload the page
cancel()
load()
}
} catch (e: JSONException) {
Log.w(TAG, "Could not parse SSE event ('$payload')", e)
}
Expand Down