chore(healthcheck/icmp): log what IP is being pinged when timing out

This commit is contained in:
Quentin McGaw
2025-11-20 14:46:31 +00:00
parent 0bb9f62755
commit 815fcdb711

View File

@@ -88,7 +88,7 @@ func (i *Echoer) Echo(ctx context.Context, ip netip.Addr) (err error) {
receivedData, err := receiveEchoReply(conn, id, i.buffer, ipVersion, i.logger)
if err != nil {
if errors.Is(err, net.ErrClosed) && ctx.Err() != nil {
return fmt.Errorf("%w", ErrTimedOut)
return fmt.Errorf("%w from %s", ErrTimedOut, ip)
}
return fmt.Errorf("receiving ICMP echo reply: %w", err)
}