[Zodb-checkins] CVS: StandaloneZODB/ZEO - StorageServer.py:1.41

Jeremy Hylton jeremy@zope.com
Fri, 9 Aug 2002 16:32:49 -0400


Update of /cvs-repository/StandaloneZODB/ZEO
In directory cvs.zope.org:/tmp/cvs-serv13263

Modified Files:
	StorageServer.py 
Log Message:
Add a close() method to the ZEOStorage that closes connection to client.

XXX If select() raises an exception inside asyncore, close the connection. 


=== StandaloneZODB/ZEO/StorageServer.py 1.40 => 1.41 ===
--- StandaloneZODB/ZEO/StorageServer.py:1.40	Tue Aug  6 19:11:08 2002
+++ StandaloneZODB/ZEO/StorageServer.py	Fri Aug  9 16:32:49 2002
@@ -118,11 +118,16 @@
     def __init__(self, server):
         self.server = server
         self.client = None
+        self._conn = None # the connection associated with client
         self.__storage = None
         self.__storage_id = "uninitialized"
         self._transaction = None
 
+    def close(self):
+        self._conn.close()
+
     def notifyConnected(self, conn):
+        self._conn = conn
         self.client = ClientStub.ClientStorage(conn)
 
     def __repr__(self):