From d0509955a73a500c9afa6ab2d5369ef522850fc3 Mon Sep 17 00:00:00 2001 From: Olaoluwa Osuntokun Date: Thu, 16 Mar 2017 12:16:24 -0700 Subject: [PATCH] routing: only log topology client sends if clients are active --- routing/notifications.go | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/routing/notifications.go b/routing/notifications.go index 534423cd1..f741e2b02 100644 --- a/routing/notifications.go +++ b/routing/notifications.go @@ -107,12 +107,14 @@ type topologyClient struct { // notifyTopologyChange notifies all registered clients of a new change in // graph topology in a non-blocking. func (r *ChannelRouter) notifyTopologyChange(topologyDiff *TopologyChange) { - log.Tracef("Sending topology notification to %v clients %v", - len(r.topologyClients), - newLogClosure(func() string { - return spew.Sdump(topologyDiff) - }), - ) + if len(r.topologyClients) != 0 { + log.Tracef("Sending topology notification to %v clients %v", + len(r.topologyClients), + newLogClosure(func() string { + return spew.Sdump(topologyDiff) + }), + ) + } for _, client := range r.topologyClients { go func(c topologyClient) {