[Twisted-web] Reply from earlier session causing code failures

Jean-Paul Calderone exarkun at divmod.com
Tue Jan 27 08:33:54 EST 2009

On Tue, 27 Jan 2009 15:35:10 +0530, Kottiyath Nair <n.kottiyath at gmail.com> wrote:
>    I use twisted-getPage to post a lot of data (5Kb separate elements) to
>the server.
>    Now, this data is sent every 5 seconds. The server can take upto 1-2
>minutes to process the data and reply back. One issue that I am seeing is
>that if I kill the sender (Cntrl+C) after I sent this data and then start it
>immediately, the reply for the earlier message actually interferes with the
>current process.
>i.e. any further connections fails too - the error that comes is:
>[Failure instance: Traceback (failure with no frames):
>twisted.internet.error.ConnectionLost: Connection to the other side was lost
>in a non-clean fashion.
>If somebody could help me on this, I would be much thankful.

In a normal configuration, Ctrl+C tells the reactor to shutdown.  That closes
all connections and prevents you from making any new ones.  If you want Ctrl+C
to do something else, you have to install a custom signal handler for it.


More information about the Twisted-web mailing list