This is to ensure that when a result set is destructed it will
never mangle with the ZOOM connection . It will also ensure
that we never return anything but cached content for a result
set when the connection (in a pazpar2 session) is reused.
void client_set_connection(struct client *cl, struct connection *con)
{
void client_set_connection(struct client *cl, struct connection *con)
{
+ if (cl->resultset)
+ ZOOM_resultset_release(cl->resultset);
if (con)
{
assert(cl->connection == 0);
if (con)
{
assert(cl->connection == 0);