<div dir="ltr">Also, the code shown in the SO post causes the GUI to freeze when attempting to stop the server.</div><div class="gmail_extra"><br><br><div class="gmail_quote">On 11 June 2013 18:20, Paul Sajna <span dir="ltr"><<a href="mailto:sajattack@gmail.com" target="_blank">sajattack@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">I continue to use threads because my application uses a GUI that becomes blocked when the server starts. Also, I am now having a problem where port is undefined until the server is stopped and started again.</div>

<div class="gmail_extra"><br><br><div class="gmail_quote"><div><div class="h5">On 10 June 2013 22:46, Glyph <span dir="ltr"><<a href="mailto:glyph@twistedmatrix.com" target="_blank">glyph@twistedmatrix.com</a>></span> wrote:<br>
</div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="h5">
<div style="word-wrap:break-word"><div><br><div><div>On Jun 10, 2013, at 9:38 PM, Paul Sajna <<a href="mailto:sajattack@gmail.com" target="_blank">sajattack@gmail.com</a>> wrote:</div><br><blockquote type="cite">
<div style="letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><div dir="ltr"><span style="font-family:arial,sans-serif;font-size:13px">I'm having a bit of trouble setting up an ssh-type server with twisted. When I shutdown or restart the server, the port remains open. Please have a look at my stackoverflow question. Thank you.</span><div style="font-family:arial,sans-serif;font-size:13px">

<br></div><div style="font-family:arial,sans-serif;font-size:13px"><a href="http://stackoverflow.com/questions/16379504/port-object-has-no-attribute-socket/16380253?noredirect=1#comment23490486_16380253" target="_blank">http://stackoverflow.com/questions/16379504/port-object-has-no-attribute-socket/16380253?noredirect=1#comment23490486_16380253</a></div>

</div></div></blockquote><br></div></div><div>Hi Paul,</div><div><br></div><div>I'm sorry you're having a hard time working out how to do what you want with Twisted, but there's already an answer on this question.</div>

<div dir="auto"><br></div><div dir="auto">The answer tells you to stop using threads, but you don't seem to have stopped using threads.  Add an example that doesn't use threads, or try the example I put in my answer.</div>

<div dir="auto"><br></div><div dir="auto">Also, Twisted 9.0 is 5 years old at this point.  Many, many bugs have been fixed since then.  You may want to upgrade to a more recent version.</div><div dir="auto"><br></div><div dir="auto">

I'm still happy to help you with this if you can explain what, exactly, you still don't understand.</div><span><font color="#888888"><div dir="auto"><br></div><div dir="auto">-glyph</div><br></font></span></div>
<br></div></div>_______________________________________________<br>
Twisted-Python mailing list<br>
<a href="mailto:Twisted-Python@twistedmatrix.com" target="_blank">Twisted-Python@twistedmatrix.com</a><br>
<a href="http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python" target="_blank">http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python</a><br>
<br></blockquote></div><br></div>
</blockquote></div><br></div>