pike.git/
lib/
modules/
Sql.pmod/
pgsql.pike
Branch:
Tag:
Non-build tags
All tags
No tags
2012-04-12
2012-04-12 22:45:57 by Stephen R. van den Berg <srb@cuci.nl>
bbf653e63d4f104ed802f92842d68eb3582343bb (
10
lines) (+
7
/-
3
)
[
Show
|
Annotate
]
Branch:
7.9
pgsql: Add support for optional infinite reconnects.
181:
//! @mapping //! @member int "reconnect" //! Set it to zero to disable automatic reconnects upon losing
-
//! the connection to the database
+
//! the connection to the database
. Not setting it, or setting
+
//! it to one, will cause one timed reconnect to take place.
+
//! Setting it to -1 will cause the system to try and reconnect
+
//! indefinitely
//! @member int "use_ssl" //! If the database supports and allows SSL connections, the session //! will be SSL encrypted, if not, the connection will fallback
604:
if(!reconnect(1)) { sleep(RECONNECTDELAY); if(!reconnect(1))
-
{ sleep(RECONNECTBACKOFF);
-
reconnect(1);
+
{
do
sleep(RECONNECTBACKOFF);
+
while(!
reconnect(1)
&& options->reconnect==-1)
;
} } }