def call_on_disconnect(self, conn_id):
        for setter_conn_id, code in self._on_disconnect:
            if not setter_conn_id or setter_conn_id == conn_id:
                exec_msg = messages.Exec(self.ns, code, None)
                if opt_debug:
                    daemon_log("on disconnect %s: %s" % (conn_id, exec_msg,))
                rv = _local_execute(exec_msg)
                if opt_debug:
                    daemon_log("on disconnect rv: %s" % (rv,))
                if setter_conn_id == conn_id:
                    self._on_disconnect.remove((conn_id, code))