Skip to content

Commit 574805c

Browse files
committed
log once not for each closure
1 parent 4b06493 commit 574805c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/amqproxy/upstream.cr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,12 +117,12 @@ module AMQProxy
117117
clients = Set(Client).new
118118
@channels_lock.synchronize do
119119
return if @channels.empty?
120+
Log.debug { "Upstream connection closed, closing #{@channels.size} client connections" }
120121
@channels.each_value do |downstream_connection|
121122
clients << downstream_connection.client
122123
end
123124

124125
clients.each do |client|
125-
Log.debug { "Closing client connection due to upstream failure." }
126126
client.close_connection(code, reason)
127127
end
128128
@channels.clear

0 commit comments

Comments
 (0)