Skip to content

Commit 15e6c27

Browse files
authored
p2p: fix minor typo and remove fd parameter in checkInboundConn (#22547)
1 parent 5129cdc commit 15e6c27

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

p2p/server.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -876,8 +876,8 @@ func (srv *Server) listenLoop() {
876876
}
877877

878878
remoteIP := netutil.AddrIP(fd.RemoteAddr())
879-
if err := srv.checkInboundConn(fd, remoteIP); err != nil {
880-
srv.log.Debug("Rejected inbound connnection", "addr", fd.RemoteAddr(), "err", err)
879+
if err := srv.checkInboundConn(remoteIP); err != nil {
880+
srv.log.Debug("Rejected inbound connection", "addr", fd.RemoteAddr(), "err", err)
881881
fd.Close()
882882
slots <- struct{}{}
883883
continue
@@ -897,7 +897,7 @@ func (srv *Server) listenLoop() {
897897
}
898898
}
899899

900-
func (srv *Server) checkInboundConn(fd net.Conn, remoteIP net.IP) error {
900+
func (srv *Server) checkInboundConn(remoteIP net.IP) error {
901901
if remoteIP == nil {
902902
return nil
903903
}

0 commit comments

Comments
 (0)