FIX: Avoid throwing an error when processing PG down message.

FIX: Avoid throwing an error when processing PG down message.

diff --git a/lib/active_record/connection_adapters/postgresql_fallback_adapter.rb b/lib/active_record/connection_adapters/postgresql_fallback_adapter.rb
index 3d4f9b2..4c3ba60 100644
--- a/lib/active_record/connection_adapters/postgresql_fallback_adapter.rb
+++ b/lib/active_record/connection_adapters/postgresql_fallback_adapter.rb
@@ -18,8 +18,12 @@ class PostgreSQLFallbackHandler
 
     MessageBus.subscribe(DATABASE_DOWN_CHANNEL) do |payload, pid|
       if @initialized && pid != Process.pid
-        RailsMultisite::ConnectionManagement.with_connection(payload.data['db']) do
-          clear_connections
+        begin
+          RailsMultisite::ConnectionManagement.with_connection(payload.data['db']) do
+            clear_connections
+          end
+        rescue PG::UnableToSend
+          # Site has already failed over
         end
       end
     end

GitHub sha: cc83bc8f