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

version» Context lines:

pike.git/lib/modules/Sql.pmod/pgsql.pike:602:    Stdio.Buffer plugbuffer=Stdio.Buffer()->add_int32(PG_PROTOCOL(3,0));    if(user)    plugbuffer->add("user\0")->add(user)->add_int8(0);    if(database)    plugbuffer->add("database\0")->add(database)->add_int8(0);    _options.reconnect=undefinedp(_options.reconnect) || _options.reconnect;    foreach(_options-.pgsql_util.censoroptions; string name; mixed value)    plugbuffer->add(name)->add_int8(0)->add((string)value)->add_int8(0);    plugbuffer->add_int8(0);    PD("%O\n",(string)plugbuffer); -  ci->start()->add_hstring(plugbuffer,4,4)->sendcmd(SENDOUT); +  if(catch(ci->start()->add_hstring(plugbuffer,4,4)->sendcmd(SENDOUT))) { +  if(_options.reconnect) +  _connectfail(); +  else +  destruct(waitforauthready); +  return; +  }    } // Do not flush at this point, PostgreSQL 9.4 disapproves    cancelsecret=0;   #ifdef PG_DEBUG    PD("Processloop\n");    string datarowdebug;    int datarowdebugcount;       void showportal(int msgtype) {    if(objectp(portal))    PD("%d<%O %d %c switch portal\n",