X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fdb%2Floadbalancer%2FLBFactorySimple.php;h=1c9e094469123bd330a3f2e74079c6262b1e0609;hb=1af6474a6ea3b77268f3af097894061286d61f80;hp=353c47a47849ddae85cffb7a3caf85fa9b5d36ea;hpb=ff9f2fa33719753ff0c708f9b4a84c57593b9e58;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/db/loadbalancer/LBFactorySimple.php b/includes/db/loadbalancer/LBFactorySimple.php index 353c47a478..1c9e094469 100644 --- a/includes/db/loadbalancer/LBFactorySimple.php +++ b/includes/db/loadbalancer/LBFactorySimple.php @@ -29,8 +29,6 @@ class LBFactorySimple extends LBFactory { private $mainLB; /** @var LoadBalancer[] */ private $extLBs = array(); - /** @var ChronologyProtector */ - private $chronProt; /** @var string */ private $loadMonitorClass; @@ -38,7 +36,6 @@ class LBFactorySimple extends LBFactory { public function __construct( array $conf ) { parent::__construct( $conf ); - $this->chronProt = new ChronologyProtector; $this->loadMonitorClass = isset( $conf['loadMonitorClass'] ) ? $conf['loadMonitorClass'] : null; @@ -159,14 +156,10 @@ class LBFactorySimple extends LBFactory { } } - public function shutdown() { - if ( $this->mainLB ) { - $this->chronProt->shutdownLB( $this->mainLB ); + public function shutdown( $flags = 0 ) { + if ( !( $flags & self::SHUTDOWN_NO_CHRONPROT ) ) { + $this->shutdownChronologyProtector( $this->chronProt ); } - foreach ( $this->extLBs as $extLB ) { - $this->chronProt->shutdownLB( $extLB ); - } - $this->chronProt->shutdown(); - $this->commitMasterChanges(); + $this->commitMasterChanges(); // sanity } }