Navigation Menu

Skip to content

Commit

Permalink
Allow to forward "read" message for non-service provider node
Browse files Browse the repository at this point in the history
  • Loading branch information
piroor committed Apr 7, 2015
1 parent 83db9b9 commit 3374e7f
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/droonga/engine_node.rb
Expand Up @@ -95,7 +95,7 @@ def forwardable?

def readable?
forwardable? and @buffer.empty? and
not have_unprocessed_messages?
(complete_service_provider? or not service_provider?)
end

def writable?
Expand Down Expand Up @@ -182,6 +182,10 @@ def absorb_destination?
role == NodeMetadata::Role::ABSORB_DESTINATION
end

def complete_service_provider?
service_provider? and not have_unprocessed_messages?
end

def really_writable?
return false unless writable?
case sender_role
Expand Down

0 comments on commit 3374e7f

Please sign in to comment.