[Twisted-Python] how to drop connection

Michael Porter mporter at despammed.com
Tue Jul 29 08:55:30 EDT 2003


I'm trying to close down a web server (wihout closing the application) but
am having problems closing already established connections.

I'm using port.stopListening() which closes the port and stops the factory
but this doesn't seem to close already established connections. So, if I
then get another request from an established connection, an attempt is made
to service the request. This causes a few problems including
"AttributeError: Site instance has no attribute 'logFile'" from HTTPFactory
because it deleted its logFile attribute when stopFactory was called.

Does anyone know how I can close these established connections?



More information about the Twisted-Python mailing list