def on_close(self):
        """ Called by the server when the App have to be terminated
        """
        self._stop_update_flag = True
        for ws in self.websockets:
            ws.close()
Called by the server when the App have to be terminated