Skip to content

Commit

Permalink
chore: fix typos (#2694)
Browse files Browse the repository at this point in the history
  • Loading branch information
GoodDaisy authored Feb 5, 2024
1 parent cea5b4c commit a759ed5
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion p2p/net/reuseport/dialer.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ func randAddr(addrs []*net.TCPAddr) *net.TCPAddr {
//
// In-order:
//
// 1. If we're _explicitly_ listening on the prefered source address for the destination address
// 1. If we're _explicitly_ listening on the preferred source address for the destination address
// (per the system's routes), we'll use that listener's port as the source port.
// 2. If we're listening on one or more _unspecified_ addresses (zero address), we'll pick a source
// port from one of these listener's.
Expand Down
4 changes: 2 additions & 2 deletions p2p/net/swarm/swarm_dial.go
Original file line number Diff line number Diff line change
Expand Up @@ -426,7 +426,7 @@ var quicDraft29DialMatcher = mafmt.And(mafmt.IP, mafmt.Base(ma.P_UDP), mafmt.Bas
// filterKnownUndialables takes a list of multiaddrs, and removes those
// that we definitely don't want to dial: addresses configured to be blocked,
// IPv6 link-local addresses, addresses without a dial-capable transport,
// addresses that we know to be our own, and addresses with a better tranport
// addresses that we know to be our own, and addresses with a better transport
// available. This is an optimization to avoid wasting time on dials that we
// know are going to fail or for which we have a better alternative.
func (s *Swarm) filterKnownUndialables(p peer.ID, addrs []ma.Multiaddr) (goodAddrs []ma.Multiaddr, addrErrs []TransportError) {
Expand Down Expand Up @@ -546,7 +546,7 @@ func (s *Swarm) dialAddr(ctx context.Context, p peer.ID, addr ma.Multiaddr, updC
}

// We're recording any error as a failure here.
// Notably, this also applies to cancelations (i.e. if another dial attempt was faster).
// Notably, this also applies to cancellations (i.e. if another dial attempt was faster).
// This is ok since the black hole detector uses a very low threshold (5%).
s.bhd.RecordResult(addr, err == nil)

Expand Down
2 changes: 1 addition & 1 deletion p2p/net/upgrader/listener.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ type listener struct {

// Close closes the listener.
func (l *listener) Close() error {
// Do this first to try to get any relevent errors.
// Do this first to try to get any relevant errors.
err := l.Listener.Close()

l.cancel()
Expand Down
2 changes: 1 addition & 1 deletion p2p/protocol/circuitv2/relay/relay.go
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,7 @@ func (r *Relay) handleConnect(s network.Stream, msg *pbv2.HopMessage) pbv2.Statu
destConns := r.conns[dest.ID]
if destConns >= r.rc.MaxCircuits {
r.mx.Unlock()
log.Debugf("refusing connection from %s to %s; too many connecitons to %s", src, dest.ID, dest.ID)
log.Debugf("refusing connection from %s to %s; too many connections to %s", src, dest.ID, dest.ID)
fail(pbv2.Status_RESOURCE_LIMIT_EXCEEDED)
return pbv2.Status_RESOURCE_LIMIT_EXCEEDED
}
Expand Down

0 comments on commit a759ed5

Please sign in to comment.