[Groonga-commit] groonga/grntest [master] Read output more slowly

Back to archive index

Kouhei Sutou null+****@clear*****
Wed Nov 7 15:51:58 JST 2012


Kouhei Sutou	2012-11-07 15:51:58 +0900 (Wed, 07 Nov 2012)

  New Revision: ac436c97b9dcefcc150bef211b20ff0b6723be82
  https://github.com/groonga/grntest/commit/ac436c97b9dcefcc150bef211b20ff0b6723be82

  Log:
    Read output more slowly

  Modified files:
    lib/grntest/tester.rb

  Modified: lib/grntest/tester.rb (+4 -2)
===================================================================
--- lib/grntest/tester.rb    2012-10-16 12:28:42 +0900 (06f39a9)
+++ lib/grntest/tester.rb    2012-11-07 15:51:58 +0900 (278d737)
@@ -1396,8 +1396,10 @@ EOF
         timeout = first_timeout
         while IO.select([output], [], [], timeout)
           break if output.eof?
-          content << output.readpartial(65535)
-          timeout = 0
+          request_bytes = 1024
+          read_content = output.readpartial(request_bytes)
+          content << read_content
+          timeout = 0 if read_content.bytesize < request_bytes
         end
         content
       end
-------------- next part --------------
HTML����������������������������...
Download 



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