Kouhei Sutou
null+****@clear*****
Tue Dec 17 23:10:28 JST 2013
Kouhei Sutou 2013-12-17 23:10:28 +0900 (Tue, 17 Dec 2013) New Revision: 77117c4a1afe4f437986d3d44f57005b8441d998 https://github.com/droonga/droonga-client-ruby/commit/77117c4a1afe4f437986d3d44f57005b8441d998 Message: Drop receive stop feature by return value from yield Modified files: lib/droonga/client/connection/droonga_protocol.rb Modified: lib/droonga/client/connection/droonga_protocol.rb (+2 -9) =================================================================== --- lib/droonga/client/connection/droonga_protocol.rb 2013-12-17 23:07:52 +0900 (f798e1b) +++ lib/droonga/client/connection/droonga_protocol.rb 2013-12-17 23:10:28 +0900 (2f1cfbb) @@ -82,9 +82,6 @@ module Droonga # The block is called when response is received. # @yieldparam [Object] response # The response. - # @yieldreturn [Boolean] - # true if you want to wait more responses, - # false otherwise. # # @return [Request] The request object. def execute(message, options={}, &block) @@ -109,12 +106,8 @@ module Droonga else thread = Thread.new do begin - loop do - response = receiver.receive(receive_options) - break if response.nil? - continue_p = yield(response) - break unless continue_p - end + response = receiver.receive(receive_options) + yield(response) if response ensure receiver.close end -------------- next part -------------- HTML����������������������������...Download