[Groonga-commit] droonga/drndump at fdc1e9e [master] Don't run on_finish callback multiple times

Back to archive index

YUKI Hiroshi null+****@clear*****
Tue Apr 14 13:17:52 JST 2015


YUKI Hiroshi	2015-04-14 13:17:52 +0900 (Tue, 14 Apr 2015)

  New Revision: fdc1e9ebdc030cf61c964e25dfb801a0f423d871
  https://github.com/droonga/drndump/commit/fdc1e9ebdc030cf61c964e25dfb801a0f423d871

  Message:
    Don't run on_finish callback multiple times

  Modified files:
    lib/drndump/dumper.rb

  Modified: lib/drndump/dumper.rb (+4 -2)
===================================================================
--- lib/drndump/dumper.rb    2015-04-14 13:04:04 +0900 (573866c)
+++ lib/drndump/dumper.rb    2015-04-14 13:17:52 +0900 (c608f66)
@@ -79,8 +79,10 @@ module Drndump
             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
-------------- next part --------------
HTML����������������������������...
Descargar 



More information about the Groonga-commit mailing list
Back to archive index