Hi Paul,
thanks for your mail, and sorry for letting you wait so long.
I have a client that connects to a BaseX server using the Client/Server API. I am currently writing failure modes to handle connection failures during runtime, and I ran into a question that I don't immediately know the answer to: if a query is defined (which returns an ID), and the connection to the BaseX server fails immediately thereafter, and a new connection is immediately built, will the ID still be associated with the query in the BaseX server or will the query be automatically erased when the connection fails?
I would need to check the sources in more detail, but I believe the ID will remain to be associated with the query if a connection is not properly closed. If this should turn out to be a memory hog, we could clean up unused IDs after the value assigned to KEEPALIVE [1] has passed.
Hope this helps, Christian