Skip to content

Commit

Permalink
change error logging to debug
Browse files Browse the repository at this point in the history
  • Loading branch information
edwardmack committed Nov 17, 2022
1 parent a534f1e commit 5940154
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions dot/peerset/peerset.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ package peerset

import (
"context"
"errors"
"fmt"
"math"
"strings"
Expand Down Expand Up @@ -641,13 +642,12 @@ func (ps *PeerSet) incoming(setID int, peers ...peer.ID) error {
} else {
err := state.tryAcceptIncoming(setID, pid)
if err != nil {
if err == ErrIncomingSlotsUnavailable {
logger.Infof("cannot accept incoming peer %s: %s", pid, err)
message.Status = Reject
if errors.Is(err, ErrIncomingSlotsUnavailable) {
logger.Debugf("cannot accept incoming peer %s: %s", pid, err)
} else {
logger.Errorf("cannot accept incoming peer %s: %s", pid, err)
message.Status = Reject
}
message.Status = Reject
} else {
logger.Debugf("incoming connection accepted from peer %s", pid)
message.Status = Accept
Expand Down

0 comments on commit 5940154

Please sign in to comment.