summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--kombu/connection.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/kombu/connection.py b/kombu/connection.py
index 94c43070..47bbef66 100644
--- a/kombu/connection.py
+++ b/kombu/connection.py
@@ -627,7 +627,12 @@ class Connection:
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}'