FIX: Ensure a Thread is always running.

This commit is contained in:
Guo Xiang Tan 2016-11-30 16:38:21 +08:00
parent b8441fba27
commit f794c25f60
1 changed files with 2 additions and 0 deletions

View File

@ -101,6 +101,8 @@ module ActiveRecord
config = config.symbolize_keys config = config.symbolize_keys
if fallback_handler.master_down? if fallback_handler.master_down?
fallback_handler.verify_master
connection = postgresql_connection(config.dup.merge({ connection = postgresql_connection(config.dup.merge({
host: config[:replica_host], port: config[:replica_port] host: config[:replica_host], port: config[:replica_port]
})) }))