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

Only allow update if pid is on current node #184

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

schrockwell
Copy link

@schrockwell schrockwell commented May 24, 2024

To the best of my knowledge, Phoenix.Tracker.update/5 should not be used to update presence metadata for processes that are on a separate node. If you do this, Bad Things will happen. Ask me how I know.

So, this PR adds a safeguard against this.

Returning {:error, :nopresence} might also be acceptable here for backwards-compatibility, at the cost of an error reason that isn't really accurate.

I did my best to implement the test case, but I couldn't follow 100% what is going on, so there may be a better way to set it up.

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