mirror of
https://github.com/discourse/discourse.git
synced 2025-05-22 16:51:22 +08:00
FIX: DiscourseRedis::FallbackHandler
not restricting number of threads spawned.
This commit is contained in:
@ -18,7 +18,7 @@ class DiscourseRedis
|
||||
|
||||
def verify_master
|
||||
synchronize do
|
||||
return if @running && !recently_checked?
|
||||
return if @running || recently_checked?
|
||||
@running = true
|
||||
end
|
||||
|
||||
@ -58,7 +58,7 @@ class DiscourseRedis
|
||||
|
||||
def recently_checked?
|
||||
if @last_checked
|
||||
Time.zone.now > (@last_checked + 5.seconds)
|
||||
Time.zone.now <= (@last_checked + 5.seconds)
|
||||
else
|
||||
false
|
||||
end
|
||||
|
Reference in New Issue
Block a user