On Mon, May 26, 2008 at 6:02 PM, Ralph Meijer &lt;<a href="mailto:twisted@ralphm.ik.nu">twisted@ralphm.ik.nu</a>&gt; 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>
&gt; [..]<br>
<div class="Ih2E3d">&gt;<br>
&gt; I had another question about the Jabber example (xmpp_client.py) in<br>
&gt; Twisted words. When I quit the application with Ctrl+C, it throws an<br>
&gt; exception:<br>
&gt;<br>
</div>&gt; [..]<br>
<br>
I haven&#39;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>&nbsp;</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">
&gt; Is there any way to modify this example so that it stops gracefully<br>
&gt; when Ctrl+C is pressed? Embedding the main script code in a try-except<br>
&gt; statement that catches KeyboardInterrupt doesn&#39;t help since Twisted<br>
&gt; seems to catch all exceptions itself.<br>
<br>
</div>I don&#39;t know of a good solution, at the moment. If the above bug gets<br>
resolved, you shouldn&#39;t need to do anything beyond that.<br>
</blockquote></div><br>OK thanks!<br><br>-- Jo<br>