|
|
@ -937,7 +937,7 @@ func (srv *Server) SetupConn(fd net.Conn, flags connFlag, dialDest *enode.Node) |
|
|
|
c.transport = srv.newTransport(fd, dialDest.Pubkey()) |
|
|
|
c.transport = srv.newTransport(fd, dialDest.Pubkey()) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
err := srv.setupConn(c, flags, dialDest) |
|
|
|
err := srv.setupConn(c, dialDest) |
|
|
|
if err != nil { |
|
|
|
if err != nil { |
|
|
|
if !c.is(inboundConn) { |
|
|
|
if !c.is(inboundConn) { |
|
|
|
markDialError(err) |
|
|
|
markDialError(err) |
|
|
@ -947,7 +947,7 @@ func (srv *Server) SetupConn(fd net.Conn, flags connFlag, dialDest *enode.Node) |
|
|
|
return err |
|
|
|
return err |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
func (srv *Server) setupConn(c *conn, flags connFlag, dialDest *enode.Node) error { |
|
|
|
func (srv *Server) setupConn(c *conn, dialDest *enode.Node) error { |
|
|
|
// Prevent leftover pending conns from entering the handshake.
|
|
|
|
// Prevent leftover pending conns from entering the handshake.
|
|
|
|
srv.lock.Lock() |
|
|
|
srv.lock.Lock() |
|
|
|
running := srv.running |
|
|
|
running := srv.running |
|
|
|