Skip to content

Commit

Permalink
Coalesce if bool + if !bool into an if - else structure
Browse files Browse the repository at this point in the history
Co-authored-by: Jose Luis Lucas <[email protected]>
  • Loading branch information
panchoh and Jose Luis Lucas committed Mar 7, 2019
1 parent 8232b61 commit 9af6ac7
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions gossip/sender/sender.go
Original file line number Diff line number Diff line change
Expand Up @@ -144,8 +144,7 @@ func (s Sender) sender(batch protocol.BatchSnapshots) {
err := s.Agent.Memberlist().SendReliable(dst, msg)
if err == nil {
break
}
if err != nil {
} else {
if retries == 0 {
log.Infof("Failed send message: %v", err)
break
Expand Down

0 comments on commit 9af6ac7

Please sign in to comment.