[Twisted-Python] Reactor takes a long time to shutdown

Richard Wall m-lists at the-moon.net
Sat Aug 25 07:53:18 EDT 2007

I'm giving a talk "An introduction to Twisted" at PyconUK and am trying to come 
up with some simple examples.

One of these, is the attached PortCheck module, that is supposed to attempt 
connection to a range of ports and report whether they're open, closed, filtered 

It works okay when run against localhost, or another machine on my local 
network, but I've noticed that when I run it against an internet host, the 
reactor takes ages to shutdown after scanning all the ports. I wondered if there 
was anything obviously wrong with the code.

Run it as follows from bash: python portcheck.py www.google.co.uk {1..1000}

Thanks in advance for any suggestions.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: portcheck.py
Type: text/x-python
Size: 2375 bytes
Desc: not available
Url : http://twistedmatrix.com/pipermail/twisted-python/attachments/20070825/4f3599aa/attachment.py 

More information about the Twisted-Python mailing list