Skip to content

Commit

Permalink
Reuse amqp connection in mapper proxy if available.
Browse files Browse the repository at this point in the history
  • Loading branch information
roidrage committed Dec 22, 2010
1 parent 1136bca commit 5a80056
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/nanite/agent.rb
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ def setup_heartbeat
end

def setup_mapper_proxy
@mapper_proxy = MapperProxy.new(identity, options)
@mapper_proxy = MapperProxy.new(identity, options.merge(:amqp => @amqp))
end

def advertise_services
Expand Down
2 changes: 1 addition & 1 deletion lib/nanite/mapper_proxy.rb
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ def initialize(id, opts)
@options = opts || {}
@identity = id
@pending_requests = {}
@amqp = start_amqp(options)
@amqp = options[:amqp] || start_amqp(options)
@serializer = Serializer.new(options[:format])
@@instance = self
end
Expand Down

0 comments on commit 5a80056

Please sign in to comment.