def clientConnectionLost(self, connector, reason): print ("Connection terminated.") reactor.stop()
def clientConnectionFailed(self, connector, reason): print ("Connection failed.") reactor.stop()