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

Reduce Plex connection timeout to avoid config flow timeouts #29172

Merged
merged 1 commit into from Nov 27, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion homeassistant/components/plex/server.py
Expand Up @@ -77,7 +77,7 @@ def _connect_with_token():
self.server_choice = (
self._server_name if self._server_name else available_servers[0][0]
)
self._plex_server = account.resource(self.server_choice).connect()
self._plex_server = account.resource(self.server_choice).connect(timeout=10)

def _connect_with_url():
session = None
Expand Down
2 changes: 1 addition & 1 deletion tests/components/plex/mock_classes.py
Expand Up @@ -30,7 +30,7 @@ def __init__(self, index):
self.provides = ["server"]
self._mock_plex_server = MockPlexServer(index)

def connect(self):
def connect(self, timeout):
"""Mock the resource connect method."""
return self._mock_plex_server

Expand Down