Skip to content

Commit 6b57065

Browse files
committed
incusd/instance/qemu: Don't block on Windows agent
Signed-off-by: Stéphane Graber <[email protected]>
1 parent a0984bc commit 6b57065

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

internal/server/instance/drivers/driver_qemu.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -404,12 +404,12 @@ func (d *qemu) getAgentClient() (*http.Client, error) {
404404
client.Transport = &http.Transport{
405405
TLSClientConfig: tlsConfig,
406406
DialContext: func(_ context.Context, network, addr string) (net.Conn, error) {
407-
return net.Dial("tcp", networkAddress)
407+
return net.DialTimeout("tcp", networkAddress, 100*time.Millisecond)
408408
},
409409
DisableKeepAlives: true,
410-
ExpectContinueTimeout: time.Second * 30,
410+
ExpectContinueTimeout: time.Second * 3,
411411
ResponseHeaderTimeout: time.Second * 3600,
412-
TLSHandshakeTimeout: time.Second * 5,
412+
TLSHandshakeTimeout: time.Second * 3,
413413
}
414414

415415
_, err := client.Get("https://agent/")

0 commit comments

Comments
 (0)