def connectionLost(self, reason):
        """
        This seems to be the only reliable place of catching lost connection
        """
        self.setTimeout(None)
        transport.SSHServerTransport.connectionLost(self, reason)
        self.transport.connectionLost(reason)
        self.transport = None
        duration = self.logintime - time.time()
        log.msg(eventid='cowrie.session.closed',
            format='Connection lost after %(duration)d seconds',
            duration=duration)
dataset/ETHPy150Open cowrie/cowrie/cowrie/ssh/transport.py/HoneyPotTransport.connectionLost/swapped operands of `-`