Code Duplication    Length = 5-6 lines in 2 locations

includes/db/loadbalancer/LoadBalancer.php 2 locations

@@ 338-342 (lines=5) @@
335
		if ( $i !== false ) {
336
			# Slave connection successful
337
			# Wait for the session master pos for a short time
338
			if ( $this->mWaitForPos && $i > 0 ) {
339
				if ( !$this->doWait( $i ) ) {
340
					$this->mServers[$i]['slave pos'] = $conn->getSlavePos();
341
				}
342
			}
343
			if ( $this->mReadIndex <= 0 && $this->mLoads[$i] > 0 && $group === false ) {
344
				$this->mReadIndex = $i;
345
				# Record if the generic reader index is in "lagged slave" mode
@@ 368-373 (lines=6) @@
365
		$this->mWaitForPos = $pos;
366
		$i = $this->mReadIndex;
367
368
		if ( $i > 0 ) {
369
			if ( !$this->doWait( $i ) ) {
370
				$this->mServers[$i]['slave pos'] = $this->getAnyOpenConnection( $i )->getSlavePos();
371
				$this->laggedSlaveMode = true;
372
			}
373
		}
374
	}
375
376
	/**