mirror of
https://github.com/projectdiscovery/httpx.git
synced 2024-09-11 17:46:08 +03:00
cache: check if finalIps length is 0 and not less than 0
Slice's length will never be below 0. Signed-off-by: Miguel Ángel Jimeno <miguelangel4b@gmail.com>
This commit is contained in:
parent
e648a161ac
commit
49869b4d90
2
common/cache/dialer.go
vendored
2
common/cache/dialer.go
vendored
@ -39,7 +39,7 @@ func NewDialer(options Options) (DialerFunc, error) {
|
||||
finalIps = append(finalIps, ip)
|
||||
}
|
||||
}
|
||||
if err != nil || len(finalIps) < 0 {
|
||||
if err != nil || len(finalIps) == 0 {
|
||||
return nil, &NoAddressFoundError{}
|
||||
} // Dial to the IPs finally.
|
||||
for _, ip := range ips {
|
||||
|
Loading…
Reference in New Issue
Block a user