diff options
author | Rafael H. Schloming <rhs@apache.org> | 2010-07-14 13:36:03 +0000 |
---|---|---|
committer | Rafael H. Schloming <rhs@apache.org> | 2010-07-14 13:36:03 +0000 |
commit | ab016673170a60e12fdb0aa0f87de813e4d0f4f0 (patch) | |
tree | 4d2545ed09535d59faa1e65fab639bd0b966f5cf /python/qpid/messaging/util.py | |
parent | 1de71004456fa4889940a5a718378f49554b7c11 (diff) | |
download | qpid-python-ab016673170a60e12fdb0aa0f87de813e4d0f4f0.tar.gz |
fixed parsing of failover URLs; fixed driver to notice when reconnect_urls is dynamically changed
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@964044 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'python/qpid/messaging/util.py')
-rw-r--r-- | python/qpid/messaging/util.py | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/python/qpid/messaging/util.py b/python/qpid/messaging/util.py index 44833f7b79..265cf7d51f 100644 --- a/python/qpid/messaging/util.py +++ b/python/qpid/messaging/util.py @@ -50,10 +50,11 @@ def set_reconnect_urls(conn, msg): reconnect_urls = [] urls = msg.properties["amq.failover"] for u in urls: - if u.startswith("amqp:tcp:"): - parts = u.split(":") - host, port = parts[2:4] - reconnect_urls.append("%s:%s" % (host, port)) + if u.startswith("amqp:"): + for p in u[5:].split(","): + parts = p.split(":") + host, port = parts[1:3] + reconnect_urls.append("%s:%s" % (host, port)) conn.reconnect_urls = reconnect_urls log.warn("set reconnect_urls for conn %s: %s", conn, reconnect_urls) |