diff options
author | Conor Stevenson <c.stevenson@outlook.com> | 2020-06-01 22:23:05 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-06-01 23:23:05 +0200 |
commit | 255b85229b7395b7424a26eac0ab79fb813d596e (patch) | |
tree | ee9c7d6bbc9dac38611118fff31156dec53bb631 /kombu | |
parent | 1be72e3b6a2fb0466ce68380f33c8138f51b6cbf (diff) | |
download | kombu-255b85229b7395b7424a26eac0ab79fb813d596e.tar.gz |
set _connection in _ensure_connection (#1205)v4.6.9
Co-authored-by: Conor Stevenson <conor@lendingblock.com>
Diffstat (limited to 'kombu')
-rw-r--r-- | kombu/connection.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/kombu/connection.py b/kombu/connection.py index 989a5868..5922c018 100644 --- a/kombu/connection.py +++ b/kombu/connection.py @@ -434,12 +434,13 @@ class Connection(object): if not reraise_as_library_errors: ctx = self._dummy_context with ctx(): - return retry_over_time( + self._connection = retry_over_time( self._connection_factory, self.recoverable_connection_errors, (), {}, on_error, max_retries, interval_start, interval_step, interval_max, callback, timeout=timeout ) + return self._connection @contextmanager def _reraise_as_library_errors( @@ -860,7 +861,7 @@ class Connection(object): if not self._closed: if not self.connected: conn_opts = self._extract_failover_opts() - self._connection = self._ensure_connection(**conn_opts) + self._ensure_connection(**conn_opts) return self._connection def _connection_factory(self): |