Skip to content

Commit 7b20442

Browse files
authored
Merge pull request kubernetes#89979 from gaurav1086/remove_dup_net_import
Remove double import of k8s.io/apimachinery/pkg/util/net
2 parents d58224e + 29ceb8d commit 7b20442

File tree

1 file changed

+1
-2
lines changed
  • staging/src/k8s.io/apiserver/pkg/util/webhook

1 file changed

+1
-2
lines changed

staging/src/k8s.io/apiserver/pkg/util/webhook/webhook.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ import (
2626
"k8s.io/apimachinery/pkg/runtime"
2727
"k8s.io/apimachinery/pkg/runtime/schema"
2828
"k8s.io/apimachinery/pkg/runtime/serializer"
29-
"k8s.io/apimachinery/pkg/util/net"
3029
utilnet "k8s.io/apimachinery/pkg/util/net"
3130
"k8s.io/apimachinery/pkg/util/wait"
3231
"k8s.io/client-go/rest"
@@ -51,7 +50,7 @@ type GenericWebhook struct {
5150
// Otherwise it returns false for an immediate fail.
5251
func DefaultShouldRetry(err error) bool {
5352
// these errors indicate a transient error that should be retried.
54-
if net.IsConnectionReset(err) || apierrors.IsInternalError(err) || apierrors.IsTimeout(err) || apierrors.IsTooManyRequests(err) {
53+
if utilnet.IsConnectionReset(err) || apierrors.IsInternalError(err) || apierrors.IsTimeout(err) || apierrors.IsTooManyRequests(err) {
5554
return true
5655
}
5756
// if the error sends the Retry-After header, we respect it as an explicit confirmation we should retry.

0 commit comments

Comments
 (0)