Skip to content

Commit e9875e5

Browse files
committed
wrap in temporary error to retry
1 parent 524d002 commit e9875e5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

dhcp/dhcp_windows.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ func (c *DHCP) verifyIPv4InterfaceAddressCount(ctx context.Context, ifName strin
114114
addressCountErr := retrier.Do(ctx, func() error {
115115
addresses, err := c.getIPv4InterfaceAddresses(ifName)
116116
if err != nil || len(addresses) != count {
117-
return errIncorrectAddressCount
117+
return retry.WrapTemporaryError(errIncorrectAddressCount)
118118
}
119119
return nil
120120
})
@@ -183,7 +183,7 @@ func (c *DHCP) DiscoverRequest(ctx context.Context, macAddress net.HardwareAddr,
183183
// retry sending the packet until it succeeds
184184
err = retrier.Do(ctx, func() error {
185185
_, sockErr := sock.Write(bytesToSend)
186-
return sockErr
186+
return retry.WrapTemporaryError(sockErr)
187187
})
188188
if err != nil {
189189
return errors.Wrap(err, "failed to write to dhcp socket")

0 commit comments

Comments
 (0)