Navigation Menu

Skip to content

Commit

Permalink
Don't run on_finish callback multiple times
Browse files Browse the repository at this point in the history
  • Loading branch information
piroor committed Apr 14, 2015
1 parent 6a061aa commit fdc1e9e
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions lib/drndump/dumper.rb
Expand Up @@ -79,8 +79,10 @@ def run(options={}, &block)
n_dumpers += 1
when "dump.end"
n_dumpers -= 1
client.close if n_dumpers <= 0
@on_finish.call unless @on_finish.nil?
if n_dumpers <= 0
client.close
@on_finish.call unless @on_finish.nil?
end
end
end
end
Expand Down

0 comments on commit fdc1e9e

Please sign in to comment.