Another fix for r41086. Don't keep retrying server if connection fails.
authorAaron Schulz <aaron@users.mediawiki.org>
Wed, 24 Sep 2008 17:28:55 +0000 (17:28 +0000)
committerAaron Schulz <aaron@users.mediawiki.org>
Wed, 24 Sep 2008 17:28:55 +0000 (17:28 +0000)
includes/ExternalStore.php

index 34570e2..272bcfc 100644 (file)
@@ -92,12 +92,12 @@ class ExternalStore {
                                $url = $store->store( $params, $data ); // Try to save the object
                        } catch ( DBConnectionError $error ) {
                                $url = false;
-                               unset( $tryStores[$index] ); // Don't try this one again!
-                               $tryStores = array_values( $tryStores ); // Must have consecutive keys
                        }
                        if ( $url ) {
                                return $url; // Done!
                        } else {
+                               unset( $tryStores[$index] ); // Don't try this one again!
+                               $tryStores = array_values( $tryStores ); // Must have consecutive keys
                                wfDebugLog( 'ExternalStorage', "Unable to store text to external storage $storeUrl" );
                        }
                }