Skip to content

Commit

Permalink
virt-launcher: decrease timeout for http get when detecting Istio
Browse files Browse the repository at this point in the history
The 10 second timeout is too long and may cause the launcher to
not terminate for longer than necessary.
Shortening the timeout to 2 seconds for http get requests, which
should be more than enough.

With this change, in the worst case scenario, the detection would
take at most 8 seconds (4*2) plus a few ms jitter.

Signed-off-by: Radim Hrazdil <[email protected]>
  • Loading branch information
Radim Hrazdil committed Nov 2, 2021
1 parent 9b1ac82 commit b232437
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cmd/virt-launcher/virt-launcher.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ import (
)

const defaultStartTimeout = 3 * time.Minute
const httpRequestTimeout = 10 * time.Second
const httpRequestTimeout = 2 * time.Second

func init() {
// must registry the event impl before doing anything else.
Expand Down

0 comments on commit b232437

Please sign in to comment.