FIX: Pubsub connections need to be killed too.

This commit is contained in:
Guo Xiang Tan
2016-04-07 15:28:13 +08:00
parent d6ed9848a9
commit 7f6fe8fe13
2 changed files with 2 additions and 0 deletions

View File

@ -32,6 +32,7 @@ class DiscourseRedis
if slave_client.call([:info]).split("\r\n").include?(MASTER_LINK_STATUS)
logger.warn "#{log_prefix}: Master server is active, killing all connections to slave..."
slave_client.call([:client, [:kill, 'type', 'normal']])
slave_client.call([:client, [:kill, 'type', 'pubsub']])
Discourse.clear_readonly!
Discourse.request_refresh!
@master = true