summaryrefslogtreecommitdiff
path: root/python/qpid/client.py
diff options
context:
space:
mode:
authorGordon Sim <gsim@apache.org>2007-02-21 18:06:02 +0000
committerGordon Sim <gsim@apache.org>2007-02-21 18:06:02 +0000
commitc36fb4454be5ce4311aa5f5d0e5683db713c5545 (patch)
treef8997a71e6c6460ec4d5e5df209f3233fc4b3707 /python/qpid/client.py
parent0b3c81e3a15d02fb3d52926b72df6cbe33c4f811 (diff)
downloadqpid-python-c36fb4454be5ce4311aa5f5d0e5683db713c5545.tar.gz
Ensure socket is closed in tearDown
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/branches/qpid.0-9@510128 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'python/qpid/client.py')
-rw-r--r--python/qpid/client.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/python/qpid/client.py b/python/qpid/client.py
index f6a540c7ec..fa078facb0 100644
--- a/python/qpid/client.py
+++ b/python/qpid/client.py
@@ -76,7 +76,8 @@ class Client:
self.locale = locale
self.tune_params = tune_params
- self.conn = Connection(connect(self.host, self.port), self.spec)
+ self.socket = connect(self.host, self.port)
+ self.conn = Connection(self.socket, self.spec)
self.peer = Peer(self.conn, ClientDelegate(self), self.opened)
self.conn.init()
@@ -90,6 +91,9 @@ class Client:
def opened(self, ch):
ch.references = References()
+ def close(self):
+ self.socket.close()
+
class ClientDelegate(Delegate):
def __init__(self, client):