[Groonga-commit] droonga/droonga-client-ruby at c99f4b1 [master] Support infinite loop

アーカイブの一覧に戻る

Kouhei Sutou null+****@clear*****
Fri Jan 17 16:20:59 JST 2014


Kouhei Sutou	2014-01-17 16:20:59 +0900 (Fri, 17 Jan 2014)

  New Revision: c99f4b16c5e758e812833aa29f0743c33f8573aa
  https://github.com/droonga/droonga-client-ruby/commit/c99f4b16c5e758e812833aa29f0743c33f8573aa

  Message:
    Support infinite loop

  Modified files:
    lib/droonga/client/connection/droonga_protocol.rb

  Modified: lib/droonga/client/connection/droonga_protocol.rb (+2 -2)
===================================================================
--- lib/droonga/client/connection/droonga_protocol.rb    2014-01-17 15:14:39 +0900 (34a11f1)
+++ lib/droonga/client/connection/droonga_protocol.rb    2014-01-17 16:20:59 +0900 (eb8def6)
@@ -160,12 +160,12 @@ module Droonga
 
           BUFFER_SIZE = 8192
           def receive(options={}, &block)
-            timeout = options[:timeout] || 1
+            timeout = options[:timeout]
             loop do
               start = Time.new
               readable_ios, = IO.select(@read_ios, nil, nil, timeout)
               break if readable_ios.nil?
-              if timeout > 0
+              if timeout
                 timeout -= (Time.now - start)
                 timeout = 0 if timeout < 0
               end
-------------- next part --------------
HTML����������������������������...
ダウンロード 



More information about the Groonga-commit mailing list
アーカイブの一覧に戻る