Skip to content

Commit

Permalink
Update connection.py (#1311)
Browse files Browse the repository at this point in the history
Based on my headaches with silent revert to `localhost` I submit this PR.
The developer should be notified if their host settings are not found.
Details on the issue are here: celery/celery#6661
  • Loading branch information
Krogsager committed Mar 15, 2021
1 parent 7da36e4 commit c7068ef
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion kombu/connection.py
Expand Up @@ -627,7 +627,12 @@ def _info(self, resolve=True):
transport_cls, transport_cls)
D = self.transport.default_connection_params

hostname = self.hostname or D.get('hostname')
if not self.hostname:
logger.warning(f"No hostname was supplied. Reverting to default '{D.get('hostname')}'")
hostname = D.get('hostname')
else:
hostname = self.hostname

if self.uri_prefix:
hostname = f'{self.uri_prefix}+{hostname}'

Expand Down

0 comments on commit c7068ef

Please sign in to comment.