Skip to content

Commit

Permalink
fix(peerset): check for incoming slot error (#2952)
Browse files Browse the repository at this point in the history
  • Loading branch information
edwardmack committed Dec 6, 2022
1 parent 0445926 commit a1602bc
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion 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,7 +642,11 @@ 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)
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
} else {
logger.Debugf("incoming connection accepted from peer %s", pid)
Expand Down

0 comments on commit a1602bc

Please sign in to comment.