mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-05-17 05:26:36 +00:00
p2p: handle return false from TCPEndpoint (#34916)
This commit is contained in:
parent
8581125a21
commit
bcb68d23b3
1 changed files with 4 additions and 1 deletions
|
|
@ -67,7 +67,10 @@ type tcpDialer struct {
|
|||
}
|
||||
|
||||
func (t tcpDialer) Dial(ctx context.Context, dest *enode.Node) (net.Conn, error) {
|
||||
addr, _ := dest.TCPEndpoint()
|
||||
addr, ok := dest.TCPEndpoint()
|
||||
if !ok {
|
||||
return nil, errNoPort
|
||||
}
|
||||
return t.d.DialContext(ctx, "tcp", addr.String())
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue