fix: update inline error for linter

This commit is contained in:
Jake Daynes
2026-03-13 04:21:14 -07:00
parent e4ec21e135
commit beb59543dc
+9 -3
View File
@@ -152,14 +152,20 @@ func (a Attacker) handleRedirect(stream *cameradar.Stream, resHeaders base.Heade
}
if location.Hostname() != "" {
if addr, err := netip.ParseAddr(location.Hostname()); err == nil {
addr, err := netip.ParseAddr(location.Hostname())
if err == nil {
stream.Address = addr
}
}
if location.Port() != "" {
if port, err := strconv.Atoi(location.Port()); err == nil {
stream.Port = uint16(port)
port, err := strconv.Atoi(location.Port())
if err == nil {
if port >= 0 && port <= 65535 {
stream.Port = uint16(port)
}
}
}
}