You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@thrift.apache.org by kc...@apache.org on 2009/03/03 23:13:46 UTC
svn commit: r749795 -
/incubator/thrift/trunk/lib/py/src/transport/TTwisted.py
Author: kclark
Date: Tue Mar 3 22:13:46 2009
New Revision: 749795
URL: http://svn.apache.org/viewvc?rev=749795&view=rev
Log:
THRIFT-148. py: One more time, reapply the most *recent* patch
Modified:
incubator/thrift/trunk/lib/py/src/transport/TTwisted.py
Modified: incubator/thrift/trunk/lib/py/src/transport/TTwisted.py
URL: http://svn.apache.org/viewvc/incubator/thrift/trunk/lib/py/src/transport/TTwisted.py?rev=749795&r1=749794&r2=749795&view=diff
==============================================================================
--- incubator/thrift/trunk/lib/py/src/transport/TTwisted.py (original)
+++ incubator/thrift/trunk/lib/py/src/transport/TTwisted.py Tue Mar 3 22:13:46 2009
@@ -1,6 +1,7 @@
from zope.interface import implements, Interface, Attribute
-from twisted.internet.protocol import Protocol, ServerFactory, ClientFactory,
+from twisted.internet.protocol import Protocol, ServerFactory, ClientFactory, \
connectionDone
+from twisted.internet import defer
from twisted.protocols import basic
from twisted.python import log
from thrift.transport import TTransport
@@ -45,6 +46,7 @@
self._oprot_factory = oprot_factory
self.recv_map = {}
+ self.started = defer.Deferred()
def dispatch(self, msg):
self.sendString(msg)
@@ -52,6 +54,7 @@
def connectionMade(self):
tmo = TCallbackTransport(self.dispatch)
self.client = self._client_class(tmo, self._oprot_factory)
+ self.started.callback(self.client)
def connectionLost(self, reason=connectionDone):
for k,v in self.client._reqs.iteritems():