Skip to content

Commit f96a18c

Browse files
committed
vhost setting if url.path is not empty
1 parent 5b5d933 commit f96a18c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

rabbitmq_amqp_python_client/qpid/proton/_reactor.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1099,7 +1099,7 @@ def __init__(self, connection: Connection) -> None:
10991099
def _connect(self, connection: Connection, url: Url) -> None:
11001100
connection.url = url
11011101
# if virtual-host not set, use host from address as default
1102-
if url.path is not None:
1102+
if url.path is not None and url.path != '':
11031103
rabbitmq_vhost = urllib.parse.quote(url.path.replace("+", "%2B"))
11041104
connection.hostname = "vhost:{}".format(rabbitmq_vhost)
11051105
else:

0 commit comments

Comments
 (0)