Permalink
Browse files

Reuse amqp connection in mapper proxy if available.

  • Loading branch information...
1 parent 1136bca commit 5a80056504ee282868b9ce5f4f89f24112a22cfd @roidrage roidrage committed Dec 22, 2010
Showing with 2 additions and 2 deletions.
  1. +1 −1 lib/nanite/agent.rb
  2. +1 −1 lib/nanite/mapper_proxy.rb
View
@@ -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
@@ -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

0 comments on commit 5a80056

Please sign in to comment.