Merge "Selenium: replace UserLoginPage with BlankPage where possible"
[lhc/web/wiklou.git] / includes / clientpool / SquidPurgeClient.php
index 005b326..6b5482c 100644 (file)
@@ -25,7 +25,7 @@
  * Uses asynchronous I/O, allowing purges to be done in a highly parallel
  * manner.
  *
- * Could be replaced by curl_multi_exec() or some such.
+ * @todo Consider using MultiHttpClient.
  */
 class SquidPurgeClient {
        /** @var string */
@@ -68,9 +68,8 @@ class SquidPurgeClient {
 
        /**
         * @param string $server
-        * @param array $options
         */
-       public function __construct( $server, $options = [] ) {
+       public function __construct( $server ) {
                $parts = explode( ':', $server, 2 );
                $this->host = $parts[0];
                $this->port = $parts[1] ?? 80;
@@ -151,7 +150,7 @@ class SquidPurgeClient {
                        if ( IP::isIPv4( $this->host ) ) {
                                $this->ip = $this->host;
                        } elseif ( IP::isIPv6( $this->host ) ) {
-                               throw new MWException( '$wgSquidServers does not support IPv6' );
+                               throw new MWException( '$wgCdnServers does not support IPv6' );
                        } else {
                                Wikimedia\suppressWarnings();
                                $this->ip = gethostbyname( $this->host );