[Zodb-checkins] CVS: StandaloneZODB/ZEO - smac.py:1.11.4.3

Jeremy Hylton jeremy@zope.com
Wed, 16 Jan 2002 10:00:34 -0500


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

Modified Files:
      Tag: Standby-branch
	smac.py 
Log Message:
Possible hack!  Call asyncore.dispatcher.__init__ at end of constructor.

I saw a traceback in a thread about a smac object that didn't have an
__output variable.  My guess is that the superclass constructor gets
the object registered with a mainloop running in another thread.  Then
the mainloop invokes methods on the object before the constructor
completes.


=== StandaloneZODB/ZEO/smac.py 1.11.4.2 => 1.11.4.3 ===
 
     def __init__(self, sock, addr, map=None, debug=None):
-        self.__super_init(sock, map)
         self.addr = addr
         if debug is not None:
             self._debug = debug
@@ -135,6 +134,7 @@
         self.__msg_size = 4
         self.__output = []
         self.__closed = None
+        self.__super_init(sock, map)
 
     # XXX avoid expensive getattr calls?
     def __nonzero__(self):