We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see ourdocumentation.
There was an error while loading.Please reload this page.
DisconnectedAt
1 parent5870176 commit8940ea1Copy full SHA for 8940ea1
coderd/workspaceagents.go
@@ -579,6 +579,8 @@ func convertWorkspaceAgent(derpMap *tailcfg.DERPMap, coordinator *tailnet.Coordi
579
casedatabase.Now().Sub(dbAgent.LastConnectedAt.Time)>agentInactiveDisconnectTimeout:
580
// The connection died without updating the last connected.
581
workspaceAgent.Status=codersdk.WorkspaceAgentDisconnected
582
+// Client code needs an accurate disconnected at if the agent has been inactive.
583
+workspaceAgent.DisconnectedAt=&dbAgent.LastConnectedAt.Time
584
casedbAgent.LastConnectedAt.Valid:
585
// The agent should be assumed connected if it's under inactivity timeouts
586
// and last connected at has been properly set.