[Groonga-commit] droonga/droonga-engine at 9697c9b [master] Simplify

Back to archive index

YUKI Hiroshi null+****@clear*****
Thu Apr 23 16:55:05 JST 2015


YUKI Hiroshi	2015-04-23 16:55:05 +0900 (Thu, 23 Apr 2015)

  New Revision: 9697c9b282ffff2908f00038639d750350d7d6a2
  https://github.com/droonga/droonga-engine/commit/9697c9b282ffff2908f00038639d750350d7d6a2

  Message:
    Simplify

  Modified files:
    lib/droonga/engine_node.rb

  Modified: lib/droonga/engine_node.rb (+6 -8)
===================================================================
--- lib/droonga/engine_node.rb    2015-04-23 16:33:32 +0900 (d2009e0)
+++ lib/droonga/engine_node.rb    2015-04-23 16:55:05 +0900 (9614df5)
@@ -273,22 +273,20 @@ module Droonga
       previous_timer = @auto_close_timer
       previous_timer.detach if previous_timer
 
-      timer = Coolio::TimerWatcher.new(@auto_close_timeout)
+      @auto_close_timer = Coolio::TimerWatcher.new(@auto_close_timeout)
       on_timeout = lambda do
-        timer.detach
+        @auto_close_timer.detach
         @auto_close_timer = nil
-        sender = @sender
-        if sender
+        if @sender
           logger.info("sender for #{name} is automatically closed by timeout.")
-          sender.shutdown
+          @sender.shutdown
           @sender = nil
         end
       end
-      timer.on_timer do
+      @auto_close_timer.on_timer do
         on_timeout.call
       end
-      @loop.attach(timer)
-      @auto_close_timer = timer
+      @loop.attach(@auto_close_timer)
     end
 
     def log_tag
-------------- next part --------------
HTML����������������������������...
Download 



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