Skip to content

Commit 461c63c

Browse files
committed
adjust login timouts
1 parent ed65478 commit 461c63c

2 files changed

Lines changed: 7 additions & 4 deletions

File tree

cli/pkg/kubectl/bind-login/plugin/login.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -360,8 +360,9 @@ func (o *LoginOptions) startCallbackServerWithRandomPort(tokenCh chan<- *TokenRe
360360
})
361361

362362
server := &http.Server{
363-
Addr: fmt.Sprintf(":%d", port),
364-
Handler: mux,
363+
ReadTimeout: time.Minute * 5,
364+
Addr: fmt.Sprintf(":%d", port),
365+
Handler: mux,
365366
}
366367

367368
go func() {

cli/pkg/kubectl/bind/plugin/bind.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ import (
2727
"net/url"
2828
"os/exec"
2929
"strconv"
30+
"time"
3031

3132
"github.com/spf13/cobra"
3233
"github.com/spf13/pflag"
@@ -355,8 +356,9 @@ func (b *BindOptions) startCallbackServer(resultCh chan<- *BindResult, errCh cha
355356
})
356357

357358
server := &http.Server{
358-
Addr: fmt.Sprintf(":%d", port),
359-
Handler: mux,
359+
ReadTimeout: time.Minute * 5,
360+
Addr: fmt.Sprintf(":%d", port),
361+
Handler: mux,
360362
}
361363

362364
go func() {

0 commit comments

Comments
 (0)