Skip to content

Commit

Permalink
check for incoming slot error
Browse files Browse the repository at this point in the history
  • Loading branch information
edwardmack committed Nov 17, 2022
1 parent 8a17f37 commit a534f1e
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions dot/peerset/peerset.go
Original file line number Diff line number Diff line change
Expand Up @@ -641,8 +641,13 @@ func (ps *PeerSet) incoming(setID int, peers ...peer.ID) error {
} else {
err := state.tryAcceptIncoming(setID, pid)
if err != nil {
logger.Errorf("cannot accept incomming peer %s: %s", pid, err)
message.Status = Reject
if err == ErrIncomingSlotsUnavailable {
logger.Infof("cannot accept incoming peer %s: %s", pid, err)
message.Status = Reject
} else {
logger.Errorf("cannot accept incoming peer %s: %s", pid, err)
message.Status = Reject
}
} else {
logger.Debugf("incoming connection accepted from peer %s", pid)
message.Status = Accept
Expand Down

0 comments on commit a534f1e

Please sign in to comment.