On Mon, May 26, 2008 at 6:02 PM, Ralph Meijer <<a href="mailto:twisted@ralphm.ik.nu">twisted@ralphm.ik.nu</a>> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
On Mon, 2008-05-26 at 15:03 +0200, Jo Vermeulen wrote:<br>
> [..]<br>
<div class="Ih2E3d">><br>
> I had another question about the Jabber example (xmpp_client.py) in<br>
> Twisted words. When I quit the application with Ctrl+C, it throws an<br>
> exception:<br>
><br>
</div>> [..]<br>
<br>
I haven't seen that behavior before, but I can confirm this happens. I<br>
poked around a bit with the example. It seems that the socket is closed<br>
before its factory is shut down. It might be that the reactor shutdown<br>
procedure has changed, so I think this behavior is the result of a bug,<br>
either in the example or somewhere else. It needs more investigation, so<br>
it would be nice if you could file a ticket for it.<br><div class="Ih2E3d"></div></blockquote><div><br>Done: <a href="http://twistedmatrix.com/trac/ticket/3270">http://twistedmatrix.com/trac/ticket/3270</a><br> </div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div class="Ih2E3d">
> Is there any way to modify this example so that it stops gracefully<br>
> when Ctrl+C is pressed? Embedding the main script code in a try-except<br>
> statement that catches KeyboardInterrupt doesn't help since Twisted<br>
> seems to catch all exceptions itself.<br>
<br>
</div>I don't know of a good solution, at the moment. If the above bug gets<br>
resolved, you shouldn't need to do anything beyond that.<br>
</blockquote></div><br>OK thanks!<br><br>-- Jo<br>