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: Propagate User updates to the active Session #292

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Swatinem
Copy link
Member

In case the session was not yet flushed, we can still set the User.

Question is: Should we flush sessions as soon as we capture anything else or not?

  • on flushing early is that at least we have something, - is that it creates more load on the backend, and becomes immutable.

In case the session was not yet flushed, we can still set the User
@Swatinem Swatinem requested a review from a team November 19, 2020 09:14
@@ -178,6 +178,9 @@ impl Scope {

/// Sets the user for the current scope.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you update this doc comment.

What happens when there is a session? When will the session not see this update?

@@ -178,6 +178,9 @@ impl Scope {

/// Sets the user for the current scope.
pub fn set_user(&mut self, user: Option<User>) {
if let Some(session) = self.session.lock().unwrap().as_mut() {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

a method on a scope is supposed to affect the session?

@Swatinem Swatinem marked this pull request as draft November 19, 2020 14:39
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

Successfully merging this pull request may close these issues.

None yet

2 participants