[Twisted-Python] Timing problem with PB Broker's connectionReady

Alan Franzoni alan.franzoni.xyz at gmail.com
Wed Nov 14 10:35:09 EST 2007

Hello everybody,
I'm running Twisted 2.5 on 32-bit Ubuntu Linux (tested with both Feisty and
Gutsy) and python2.5. All packages are the distro's own ones.

I'm experiencing a small problem with the broker's connectionReady method on
the server side of the PB connection. It's not huge and doesn't cause
problems in real-world applications, but it's making more difficult for me
to write a proper unit test.

 According to the docs, connectionReady is called as soon as Banana
negotiation is done. This is true on the client side; connectionReady gets
called before the client can get the root object from the server.

But this is not true on the server side; as you can see from the printout of
the attached file, the client says it already has got the server's root
object but the connectionready hasn't been called on the server yet.

In order to be sure connectionReady has been called on the server side, I
must trigger an additional callRemote.

I suppose there's some sort of caching or lazy behaviour implied here. Did I
do something wrong? How can I force connectionReady to be called on the
server side *before* the client can actually fetch the root object's


Alan Franzoni <alan.franzoni.xyz at gmail.com>
Togli .xyz dalla mia email per contattarmi.
Remove .xyz from my address in order to contact me.
GPG Key Fingerprint (Key ID = FE068F3E):
5C77 9DC3 BD5B 3A28 E7BC 921A 0255 42AA FE06 8F3E
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://twistedmatrix.com/pipermail/twisted-python/attachments/20071114/af325a7c/attachment.htm 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: testpbserv.py
Type: text/x-python
Size: 2054 bytes
Desc: not available
Url : http://twistedmatrix.com/pipermail/twisted-python/attachments/20071114/af325a7c/attachment.py 

More information about the Twisted-Python mailing list