def keep_alive(self, conn):
        '''
        Maintains auth sessions
        '''
        while self.__up:
            msg = conn.recv(len(AUTH_KEEP_ALIVE))
            if msg != AUTH_KEEP_ALIVE:
                log.error('Received something other than %s', AUTH_KEEP_ALIVE)
                conn.close()
                return
            try:
                conn.send(AUTH_KEEP_ALIVE_ACK)
            except (IOError, socket.error) as err:
                log.error('Unable to send auth keep alive: %s', err)
                conn.close()
                return
def keep_alive ( self , conn ) : while self . __up : msg = conn . recv ( len ( AUTH_KEEP_ALIVE ) ) if msg != AUTH_KEEP_ALIVE : log . error ( 'Received something other than %s' , AUTH_KEEP_ALIVE ) conn . close ( ) return try : conn . send ( AUTH_KEEP_ALIVE_ACK ) except ( IOError , socket . error ) as err : log . error ( 'Unable to send auth keep alive: %s' , err ) conn . close ( ) return
Maintains auth sessions