Skip to content

Commit

Permalink
[FAB-3198] gossip: Un-necessary WARN log at shutdown
Browse files Browse the repository at this point in the history
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 <yacovm@il.ibm.com>
  • Loading branch information
yacovm committed Apr 17, 2017
1 parent 56b6d12 commit 090c3dd
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion gossip/comm/comm_impl.go
Original file line number Diff line number Diff line change
Expand Up @@ -347,7 +347,6 @@ func (c *commImpl) Accept(acceptor common.MessageAcceptor) <-chan proto.Received
go func() {
defer c.logger.Debug("Exiting Accept() loop")
defer func() {
c.logger.Warning("Recovered")
recover()
}()

Expand Down

0 comments on commit 090c3dd

Please sign in to comment.