Skip to content

Commit 090c3dd

Browse files
committed
[FAB-3198] gossip: Un-necessary WARN log at shutdown
The gossip comm layer exposes a subscription-like API and returns a dedicated channel to the caller. Since it is convenient to iterate over a channel until it's closed, or to understand that a channel has been closed when nil is returned from select - it was implemented that at the comm layer shutdown - the subscriptions channels are closed. This might have caused a "send to closed channel" error- and so- the implementation has a defer statement with recover() that recovers from that. However- it also logs a WARN message un-necessarily because that's not something that shouldn't have happened. Change-Id: I50d03eb8482e115782b3e4090330f72720883028 Signed-off-by: Yacov Manevich <[email protected]>
1 parent 56b6d12 commit 090c3dd

File tree

1 file changed

+0
-1
lines changed

1 file changed

+0
-1
lines changed

gossip/comm/comm_impl.go

-1
Original file line numberDiff line numberDiff line change
@@ -347,7 +347,6 @@ func (c *commImpl) Accept(acceptor common.MessageAcceptor) <-chan proto.Received
347347
go func() {
348348
defer c.logger.Debug("Exiting Accept() loop")
349349
defer func() {
350-
c.logger.Warning("Recovered")
351350
recover()
352351
}()
353352

0 commit comments

Comments
 (0)