Branch: Tag:

2018-05-17

2018-05-17 07:25:55 by Stephen R. van den Berg <srb@cuci.nl>

pgsql: Return data even after the local backend has died.

1679:    return local_backend->call_out(gottimeout, timeout);    }    +  inline void scuttletimeout(array cid) { +  if (local_backend) +  local_backend->remove_call_out(cid); +  } +     //! @returns    //! One result row at a time.    //!
1697:    PD("%O Block for datarow\n", _portalname);    array cid = setuptimeout();    PT(datarow = datarows->read()); -  local_backend->remove_call_out(cid); +  scuttletimeout(cid);    if (arrayp(datarow))    return datarow;    }
1724:    if (!sizeof(datarow)) {    array cid = setuptimeout();    PT(datarow = datarows->read_array()); -  local_backend->remove_call_out(cid); +  scuttletimeout(cid);    }    replenishrows();    if (arrayp(datarow[-1]))
1767:    for (;;) {    array cid = setuptimeout();    PT(datarow = datarows->read()); -  local_backend->remove_call_out(cid); +  scuttletimeout(cid);    if (!arrayp(datarow))    break;    callout(callback, 0, this, datarow, @args);
1796:    for (;;) {    array cid = setuptimeout();    PT(datarow = datarows->read_array()); -  local_backend->remove_call_out(cid); +  scuttletimeout(cid);    if (!datarow || !arrayp(datarow[-1]))    break;    callout(callback, 0, this, datarow, @args);