From: kaliko Date: Sun, 10 Mar 2024 16:03:46 +0000 (+0100) Subject: Fixed mpd_timeout from env var X-Git-Url: https://git.kaliko.me/?a=commitdiff_plain;h=fd14cad523dc47efe45d256a338b89e1171f9319;p=python-musicpdaio.git Fixed mpd_timeout from env var --- diff --git a/mpdaio/client.py b/mpdaio/client.py index c37e0d6..00dbfed 100644 --- a/mpdaio/client.py +++ b/mpdaio/client.py @@ -41,6 +41,8 @@ class MPDClient: password: str | None = None): #: Connection pool self._pool = ConnectionPool(max_connections=CONNECTION_MAX) + #: connection timeout + self.mpd_timeout = CONNECTION_TIMEOUT self._get_envvars() #: Host used to make connections (:py:obj:`str`) self.host = host or self.server_discovery[0] @@ -48,8 +50,6 @@ class MPDClient: self.pwd = password or self.server_discovery[2] #: port used with the current connection (:py:obj:`int`, :py:obj:`str`) self.port = port or self.server_discovery[1] - #: connection timeout - self.mpd_timeout = CONNECTION_TIMEOUT log.info('Using %s:%s to connect', self.host, self.port) def _get_envvars(self):