<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 12pt;
font-family:Calibri
}
--></style></head>
<body class='hmmessage'><div dir='ltr'>Hi guys, i start to play with Twisted. My main intention is to create a add-on for run in a Raspberry Pi (Raspbmc). For now almost every thing is working fine.<div>Here is the link of the add-on</div><div><a href="https://dl.dropboxusercontent.com/u/89557567/script.cavplustcp-0.1.4.zip" target="_blank">https://dl.dropboxusercontent.com/u/89557567/script.cavplustcp-0.1.4.zip</a></div><div>My only problem is that the Xbmc (running in a Raspbmc) never close if i have Twisted running.</div><div>In the default.py i have a function that will run after the Xbmc abort request. </div><div><div>def _killConnections(self):</div><div>        if(self.server1):</div><div>           self.server1.stopListening()</div><div>        if(self.server2):</div><div>           self.server2.stopListening()</div><div>        if(self.client1):</div><div>           self.client1.disconnect()</div><div>        if(self.client2):</div><div>           self.client2.disconnect()</div><div>        protocol.transport.loseConnection() </div><div>        xbmc.log(msg="reactor stop")      </div><div>        reactor.stop()</div></div><div>I tested in a Windows 7 and works fine, the script close the connections and then the Xbmc close. If i remove this function the Xbmc will never close.</div><div>The problem is with this script running in a linux OS. The Xbmc try to close the script, but donīt work, so the Xbmc will freeze.</div><div>Can you guys help me ?</div><div>Thanks</div><div>Regards</div><div>Clayton</div><div><br></div>                                          </div></body>
</html>