speechd-discuss
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH 1/2] Improve SSIPClient.close() from the Python library.


From: Christopher Brannon
Subject: [PATCH 1/2] Improve SSIPClient.close() from the Python library.
Date: Sat, 31 Jul 2010 08:59:03 -0500

SSIPClient.close() should delete the _SSIPConnection object associated
with this client.
Doing so allows us to make the following guarantee.
If the programmer calls a method of SSIPClient after SSIPClient.close()
has been called, no methods will be called on the _SSIPConnection
associated with this client.
---
 src/python/speechd/client.py |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/src/python/speechd/client.py b/src/python/speechd/client.py
index 0452b82..1251bbe 100644
--- a/src/python/speechd/client.py
+++ b/src/python/speechd/client.py
@@ -1025,6 +1025,7 @@ class SSIPClient(object):
         """Close the connection to Speech Dispatcher."""
         if hasattr(self, '_conn'):
             self._conn.close()
+            del self._conn
 
 
 class Client(SSIPClient):
-- 
1.7.2




reply via email to

[Prev in Thread] Current Thread [Next in Thread]