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 Plex startup race condition #28934

Merged
merged 1 commit into from
Nov 21, 2019
Merged

Conversation

jjlawren
Copy link
Contributor

@jjlawren jjlawren commented Nov 21, 2019

Description:

When starting up, there was a potential race condition where we would attempt to create new media_player entities before the listening dispatcher was set up. This delays the connection of the websocket connection until HA is fully started. This ensures the dispatch listener for new media_player entities is available when new Plex clients are found during the initial scan.

Related issues: fixes #28928 fixes #28491
Possibly a fix for #28485

Checklist:

  • The code change is tested and works locally.
  • Local tests pass with tox. Your PR cannot be merged unless tests pass
  • There is no commented out code in this PR.
  • I have followed the development checklist

@balloob balloob merged commit a62bd97 into home-assistant:dev Nov 21, 2019
@jjlawren jjlawren deleted the plex_startup_race branch November 21, 2019 21:13
@jimmyeao
Copy link

Now all of my plex media players show as unavailable?

@jjlawren
Copy link
Contributor Author

@jimmyeao this is a merged PR that has not been released yet. Please open an issue if you're encountering a new problem.

@jimmyeao
Copy link

Ah, now I feel stupid! How would i go about testing this?

@jjlawren
Copy link
Contributor Author

It'll be in 0.102.1 which should be released shortly.

@balloob balloob mentioned this pull request Nov 21, 2019
@jjlawren jjlawren mentioned this pull request Nov 22, 2019
4 tasks
@lock lock bot locked and limited conversation to collaborators Nov 22, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Plex integration issue Plex component not exposing some media_players anymore.
4 participants