YUKI Hiroshi
null+****@clear*****
Tue Oct 29 10:05:46 JST 2013
YUKI Hiroshi 2013-10-29 10:05:46 +0900 (Tue, 29 Oct 2013) New Revision: c733aa382462ed9f87fdb9df026f1395ff5f4e8e https://github.com/droonga/droonga-client-ruby/commit/c733aa382462ed9f87fdb9df026f1395ff5f4e8e Message: Revert "Receiver#receive should exit when enough messages are received" Because it is a wrong way. This reverts commit 8d17b1775e1c563ab1679fa42c0f69d8c4a0b9d1. Modified files: lib/droonga/client/connection/droonga_protocol.rb Modified: lib/droonga/client/connection/droonga_protocol.rb (+1 -3) =================================================================== --- lib/droonga/client/connection/droonga_protocol.rb 2013-10-28 20:22:12 +0900 (b75092e) +++ lib/droonga/client/connection/droonga_protocol.rb 2013-10-29 10:05:46 +0900 (b97ab52) @@ -53,7 +53,7 @@ module Droonga envelope = envelope.dup envelope["replyTo"] = "#{receiver.host}:#{receiver.port}/droonga" @logger.post("message", envelope) - receiver.receive(:timeout => @timeout, :wait_for => 1).first + receiver.receive(:timeout => @timeout).first ensure receiver.close end @@ -82,14 +82,12 @@ module Droonga end def receive(options={}) - waiting_count = options[:wait_for] || 1 if IO.select([@socket], nil, nil, options[:timeout]) client =****@socke***** messages = [] unpacker = MessagePack::Unpacker.new(client) unpacker.each do |object| messages << object - break if messages.size >= waiting_count end client.close messages -------------- next part -------------- HTML����������������������������... Download