fix: routinely ping agent websocket to ensure liveness (#5824)

This commit is contained in:
Colin Adler
2023-01-23 20:05:29 +00:00
committed by GitHub
parent ba8dd496c3
commit d2ae16dd22
4 changed files with 42 additions and 4 deletions
+1
View File
@@ -83,6 +83,7 @@ func workspaceAgent() *cobra.Command {
slog.F("version", version),
)
client := codersdk.New(coderURL)
client.Logger = logger
// Set a reasonable timeout so requests can't hang forever!
client.HTTPClient.Timeout = 10 * time.Second