Branch: Tag:

2012-04-04

2012-04-04 07:57:19 by Stephen R. van den Berg <srb@cuci.nl>

pgsql: Properly fix authentication errors.

1039:   { close();   }    - private void reconnect(void|int force) + private int reconnect(void|int force)   { Thread.MutexKey connectmtxkey;    if(_c)    { reconnected++;
1085:    plugbuf[0]=_c.plugint32(len);    _c.write(plugbuf);    PD("%O\n",plugbuf); -  _decodemsg(readyforquery); +  { mixed err=catch(_decodemsg(readyforquery)); +  if(err) +  if(force) +  return 0; +  else +  throw(err); +  }    PD("%O\n",_runtimeparameter);    if(force)    { lastmessage+=({sprintf("Reconnected to database %s",host_info())});    runcallback(backendpid,"_reconnect","");    } -  +  return 1;   }      //! @decl void reload()