Skip to content

Clean up MapboxToken subscriptions when DistanceRequest unmounts #24612

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

Closed
neil-marcellini opened this issue Aug 15, 2023 · 5 comments
Closed
Assignees
Labels
Daily KSv2 Improvement Item broken or needs improvement. Reviewing Has a PR in review

Comments

@neil-marcellini
Copy link
Contributor

Problem

As described here, we aren't cleaning up our Onxy.connect subscriptions, App state listener, and timeout from the MapboxToken library when the DistanceRequest component un-mounts. That's a bit of a waste.

Solution

Clean up when the DistanceRequest component un-mounts.

@tgolen
Copy link
Contributor

tgolen commented Aug 17, 2023

PR is up for this: #25408

@tgolen
Copy link
Contributor

tgolen commented Aug 17, 2023

Depending on the order of how things get merged...

If #24306 is merged first, then #25408 will need to be updated to tie into the unmount of the DistanceRequest component.

If #25408 is merged first, then #24306 will need to be updated to use Mapbox.stop()

@tgolen tgolen added Daily KSv2 Improvement Item broken or needs improvement. and removed Weekly KSv2 labels Aug 17, 2023
@hayata-suenaga
Copy link
Contributor

If #25408 is merged first, then #24306 will need to be updated to use Mapbox.stop()

#25408 has been merged first. Updating my PR to use the stop method to cleanup listeners

@melvin-bot
Copy link

melvin-bot bot commented Aug 25, 2023

@tgolen Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!

@tgolen
Copy link
Contributor

tgolen commented Aug 28, 2023

This is done and all deployed.

@tgolen tgolen closed this as completed Aug 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Daily KSv2 Improvement Item broken or needs improvement. Reviewing Has a PR in review
Projects
None yet
Development

No branches or pull requests

3 participants