Skip to content
Snippets Groups Projects
Commit 165dc6fb authored by Stephen R. van den Berg's avatar Stephen R. van den Berg
Browse files

Properly fix authentication errors.

Rev: lib/modules/Sql.pmod/pgsql.pike:1.79
parent d1c924c0
Branches
Tags
No related merge requests found
...@@ -1034,7 +1034,7 @@ void destroy() ...@@ -1034,7 +1034,7 @@ void destroy()
{ close(); { close();
} }
private void reconnect(void|int force) private int reconnect(void|int force)
{ Thread.MutexKey connectmtxkey; { Thread.MutexKey connectmtxkey;
if(_c) if(_c)
{ reconnected++; { reconnected++;
...@@ -1075,12 +1075,19 @@ private void reconnect(void|int force) ...@@ -1075,12 +1075,19 @@ private void reconnect(void|int force)
plugbuf[0]=_c.plugint32(len); plugbuf[0]=_c.plugint32(len);
_c.write(plugbuf); _c.write(plugbuf);
PD("%O\n",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); PD("%O\n",_runtimeparameter);
if(force) if(force)
{ lastmessage+=({sprintf("Reconnected to database %s",host_info())}); { lastmessage+=({sprintf("Reconnected to database %s",host_info())});
runcallback(backendpid,"_reconnect",""); runcallback(backendpid,"_reconnect","");
} }
return 1;
} }
//! @decl void reload() //! @decl void reload()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment