X-Git-Url: https://git.heureux-cyclage.org/?p=lhc%2Fweb%2Fwiklou.git;a=blobdiff_plain;f=includes%2Flibs%2Frdbms%2Flbfactory%2FLBFactory.php;h=64b54e47ae9605d881e11d629b259116d6419444;hp=32886e2f06446b525741500d4fbea3be56c50426;hb=5bad47dbb4519d6a67a2aba468fb513319311c9a;hpb=edf7224639b6f45c0e6762a664cfb2e84beb8e0a diff --git a/includes/libs/rdbms/lbfactory/LBFactory.php b/includes/libs/rdbms/lbfactory/LBFactory.php index 32886e2f06..64b54e47ae 100644 --- a/includes/libs/rdbms/lbfactory/LBFactory.php +++ b/includes/libs/rdbms/lbfactory/LBFactory.php @@ -124,7 +124,9 @@ abstract class LBFactory implements ILBFactory { 'ChronologyPositionIndex' => isset( $_GET['cpPosIndex'] ) ? $_GET['cpPosIndex'] : null ]; - $this->cliMode = isset( $conf['cliMode'] ) ? $conf['cliMode'] : PHP_SAPI === 'cli'; + $this->cliMode = isset( $conf['cliMode'] ) + ? $conf['cliMode'] + : ( PHP_SAPI === 'cli' || PHP_SAPI === 'phpdbg' ); $this->hostname = isset( $conf['hostname'] ) ? $conf['hostname'] : gethostname(); $this->agent = isset( $conf['agent'] ) ? $conf['agent'] : ''; @@ -313,7 +315,7 @@ abstract class LBFactory implements ILBFactory { $opts += [ 'domain' => false, 'cluster' => false, - 'timeout' => 60, + 'timeout' => $this->cliMode ? 60 : 10, 'ifWritesSince' => null ];