def disconnect ( self ) : self . logger . debug ( 'Close connection...' ) self . auto_reconnect = False if self . websocket is not None : self . websocket . close ( )
python websocket server restablish connection
Closes the connection .
def disconnect(self):
        """
        Closes the connection.
        """
        self.logger.debug('Close connection...')

        self.auto_reconnect = False

        if self.websocket is not None:
            self.websocket.close()