summaryrefslogtreecommitdiff
path: root/python/qmf/console.py
diff options
context:
space:
mode:
authorTed Ross <tross@apache.org>2009-02-19 12:00:46 +0000
committerTed Ross <tross@apache.org>2009-02-19 12:00:46 +0000
commite61b0224853e3864d2d219f8dd4c55a63a860881 (patch)
treef4119d7112ae45e3ccfaaf4350e9ebf0c692df34 /python/qmf/console.py
parent9d0a62d9b64388709ffe1593e305dee8f26a8b84 (diff)
downloadqpid-python-e61b0224853e3864d2d219f8dd4c55a63a860881.tar.gz
QPID-1669 - Added client connection management to qpid-cluster.
Also added better session-id discrimination in the qmf.console library. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@745832 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'python/qmf/console.py')
-rw-r--r--python/qmf/console.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/python/qmf/console.py b/python/qmf/console.py
index 867d707f31..abc0929955 100644
--- a/python/qmf/console.py
+++ b/python/qmf/console.py
@@ -1230,6 +1230,7 @@ class ManagedConnection(Thread):
class Broker:
""" This object represents a connection (or potential connection) to a QMF broker. """
SYNC_TIME = 60
+ nextSeq = 1
def __init__(self, session, host, port, authMech, authUser, authPass, ssl=False):
self.session = session
@@ -1242,7 +1243,8 @@ class Broker:
self.error = None
self.brokerId = None
self.connected = False
- self.amqpSessionId = "%s.%d" % (os.uname()[1], os.getpid())
+ self.amqpSessionId = "%s.%d.%d" % (os.uname()[1], os.getpid(), Broker.nextSeq)
+ Broker.nextSeq += 1
if self.session.manageConnections:
self.thread = ManagedConnection(self)
self.thread.start()