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

version» Context lines:

pike.git/lib/modules/Sql.pmod/pgsql.pike:1197:   //!   //! @note   //! This function is PostgreSQL-specific, and thus it is not available   //! through the generic SQL-interface.   /*semi*/final void close() {    if(qportals && qportals->size())    catch(cancelquery());    termlock=(termthread=Thread.Mutex())->lock();    c->close();    termthread->lock(1); -  c=0; -  destruct(waitforauthready); +  destruct(c);destruct(waitforauthready);   }      protected void destroy() {    catch(close());    .pgsql_util.unregister_backend();   }      final void _connectfail(void|mixed err) {    PD("Connect failed %O reconnectdelay %d\n",err,reconnectdelay);    destruct(waitforauthready);
pike.git/lib/modules/Sql.pmod/pgsql.pike:1255:    }    if(c) {    PD("Close old connection\n");    reconnected++;recon=1;   #ifdef PG_STATS    prepstmtused=0;   #endif    termlock=(termthread=Thread.Mutex())->lock();    c->close();    termthread->lock(1); -  c=0; +  destruct(c);    PD("Flushing old cache\n");    foreach(_prepareds;;mapping tp)    m_delete(tp,"preparedname");    if(!_options.reconnect)    ERROR("Lost connection to database %s:%d\n",_host,_port);    }    PD("Actually start to connect\n");    qportals=Thread.Queue();    _readyforcommit=Thread.Condition();    _readyforquerycount=1;