Commit 5cf7214e724427ef78a1e8d72eef1be865c2270a
Do not allow a failed connection to generate err-* file
Author: Catalin(ux) M. BOIE
Author date (UTC): 2016-01-20 22:56
Committer name: Catalin(ux) M. BOIE
Committer date (UTC): 2016-01-20 22:56
Parent(s): 115138b15e0436b56b7f75f12e5cf0d068989dea
Signing key:
Tree: 059d43c202f77b04d8eb87692b9e7f06ca90bef3
File inc/sql.inc.php changed (mode: 100644) (index 8854a3d..f1fd0ee) |
... |
... |
function rg_sql_open_nodelay($h) |
70 |
70 |
|
|
71 |
71 |
$tries = 30; |
$tries = 30; |
72 |
72 |
while ($tries > 0) { |
while ($tries > 0) { |
73 |
|
$db = pg_pconnect($str); |
|
|
73 |
|
$db = @pg_pconnect($str); |
74 |
74 |
if ($db === FALSE) { |
if ($db === FALSE) { |
75 |
75 |
rg_log("Cannot connect to db. Sleep 1 second and try again."); |
rg_log("Cannot connect to db. Sleep 1 second and try again."); |
76 |
76 |
sleep(1); |
sleep(1); |