def clientConnectionLost(self, connector, reason):
        """
        @summary: Connection lost event
        @param connector: twisted connector use for rdp connection (use reconnect to restart connection)
        @param reason: str use to advertise reason of lost connection
        """
        if reason.type == RDPSecurityNegoFail and self._security != "rdp":
            log.info("due to RDPSecurityNegoFail try standard security layer")
            self._security = rdp.SecurityLevel.RDP_LEVEL_RDP
            connector.connect()
            return

        log.info("connection lost : %s" % reason)
        RDPScreenShotFactory.__STATE__.append((connector.host, connector.port, reason))
        RDPScreenShotFactory.__INSTANCE__ -= 1
        if(RDPScreenShotFactory.__INSTANCE__ == 0):
            self._reactor.stop()
            self._app.exit()
def clientConnectionLost ( self , connector , reason ) : if reason . type == RDPSecurityNegoFail and self . _security != "rdp" : log . info ( "due to RDPSecurityNegoFail try standard security layer" ) self . _security = rdp . SecurityLevel . RDP_LEVEL_RDP connector . connect ( ) return log . info ( "connection lost : %s" % reason ) RDPScreenShotFactory . __STATE__ . append ( ( connector . host , connector . port , reason ) ) RDPScreenShotFactory . __INSTANCE__ -= 1 if ( RDPScreenShotFactory . __INSTANCE__ == 0 ) : self . _reactor . stop ( ) self . _app . exit ( )
@summary: Connection lost event
        @param connector: twisted connector use for rdp connection (use reconnect to restart connection)
        @param reason: str use to advertise reason of lost connection