[Twisted-Python] The Trial of the DirtyReactorError

Matthew Glubb matt at zgroupplc.com
Fri Apr 13 12:03:31 EDT 2007

Hash: SHA1

Hi Jean-Paul,

On 13 Apr 2007, at 16:22, Jean-Paul Calderone wrote:

> Port.stopListening can return a Deferred if shutdown is not  
> immediately
> completed.  In this case, you need to have trial wait for this  
> Deferred
> to fire before letting the test finish.

Ah. That's handy to know. Thanks.

>   Also, Port.stopListening does
> not cause Echo.connectionLost to be called.  Shutting down a port only

Yes, I have realised this now. I was getting confused with another  
event, and thought connectionLost was getting called as a result of  
port shutdown. tcp.Port.stopListening() now works fine from within  
the ServerFactory.

> You might also consider disabling the port when the connection is / 
> made/.
> This reduces the size of the window available for a second  
> connection to
> be made, and as I mentioned above, has no affect on the already- 
> established
> connection.

I have actually implemented the ListenOverflowProtocol in the server.  
This seems to do what it says on the tin!

Thanks for you help and patience :)


m a t t h e w   g l u b b

Z Group PLC

Tel: +44 (0) 8700 111 173
Fax: +44 (0) 8707 051 393
Txt: +44 (0) 7800 140 877
Web: <http://www.zgroupplc.com/>

This  email  and  any  files  transmitted  with it are  confidential and
intended solely for the use of the individual or entity to whom they are
addressed.  The opinions  expressed in this mail are those of the author
and do not necessarily  represent the views of the company.  If you have
received this email in error please notify <service at zgroupplc.com>

Version: GnuPG v1.4.1 (Darwin)


More information about the Twisted-Python mailing list