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
Expand Up @@ -243,7 +243,7 @@ def setup_heartbeat
end end


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


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

0 comments on commit 5a80056

Please sign in to comment.