Branch: Tag:

2014-11-13

2014-11-13 23:34:53 by Stephen R. van den Berg <srb@cuci.nl>

pgsql: Finetuned behaviour upon initial connection failure.

1235:    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);   }   
1266:      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) {