Skip to content
This repository has been archived by the owner on Jan 4, 2021. It is now read-only.

Commit

Permalink
Merge pull request #512 from ripienaar/511
Browse files Browse the repository at this point in the history
(#511) Reduce logging in network loops
  • Loading branch information
ripienaar committed Jun 8, 2018
2 parents a8ba628 + a420e5f commit 175c90f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
4 changes: 2 additions & 2 deletions lib/mcollective/connector/nats.rb
Original file line number Diff line number Diff line change
Expand Up @@ -359,10 +359,10 @@ def receive
msg = nil

until msg
Log.debug("Waiting for a message from NATS")

received = connection.receive

Thread.pass

begin
msg = JSON.parse(received)
rescue
Expand Down
3 changes: 1 addition & 2 deletions lib/mcollective/util/natswrapper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -210,8 +210,7 @@ def subscribe(source_name, options={})
Log.debug("Subscribing to %s" % source_name)

unless @subscriptions.include?(source_name)
@subscriptions[source_name] = @client.subscribe(source_name, options) do |msg, _, sub|
Log.debug("Received a message on %s" % [sub])
@subscriptions[source_name] = @client.subscribe(source_name, options) do |msg, _, _|
@received_queue << msg
end
end
Expand Down

0 comments on commit 175c90f

Please sign in to comment.