pike.git / lib / modules / Sql.pmod / pgsql.pike

version» Context lines:

pike.git/lib/modules/Sql.pmod/pgsql.pike:1228:    }    if(stringp(err)) {    .pgsql_util.pgsql_result or;    if(!objectp(or=portal))    or=this;    if(!or._delayederror)    or._delayederror=err;    if(objectp(portal))    portal->_releasesession();    portal=0; -  continue; +  if(!waitforauthready) +  continue; // Only continue if authentication did not fail    }    break;    }    _delayederror=err;    if(!ci->close() && !terminating && _options.reconnect)    _connectfail(); -  if(err) +  else if(waitforauthready) +  destruct(waitforauthready); +  if(err && !stringp(err))    throw(err);   }      //! Closes the connection to the database, any running queries are   //! terminated instantly.   //!   //! @note   //! This function is PostgreSQL-specific, and thus it is not available   //! through the generic SQL-interface.   void close() {
pike.git/lib/modules/Sql.pmod/pgsql.pike:1259:    c=0;   }      protected void destroy() {    close();    .pgsql_util.unregister_backend();   }      void _connectfail(void|mixed err) {    PD("Connect failed %O reconnectdelay %d\n",err,reconnectdelay); -  if(waitforauthready) { +  if(waitforauthready)    destruct(waitforauthready); -  waitforauthready=0; -  } +     if(!err || reconnectdelay) {    int tdelay;    switch(tdelay=reconnectdelay) {    case 0:    reconnectdelay=RECONNECTDELAY;    break;    default:    if(err)    _delayederror=err;    if(_options.reconnect!=-1)