class B(oscar.BOSConnection):
capabilities = [oscar.CAP_CHAT]
...
def connectionLost(self, reason):
print reason
...
class OA(oscar.OscarAuthenticator):
BOSClass = B
protocol.ClientCreator(reactor, OA, SN, PASS, icq=icqMode).connectTCP(*hostport)
reactor.run()
[Failure instance: Traceback (failure with no frames): <class 'twisted.internet.error.ConnectionLost'>: Connection to the other side was lost in a non-clean fashion.]
def connectionLost(self, reason):
print reason
reactor.stop()
Как мне при разрыве соединения перезапустить реактор?