Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit8940ea1

Browse files
authored
fix: Always setDisconnectedAt if the agent isn't connected (#4328)
Fixes#4315.
1 parent5870176 commit8940ea1

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

‎coderd/workspaceagents.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -579,6 +579,8 @@ func convertWorkspaceAgent(derpMap *tailcfg.DERPMap, coordinator *tailnet.Coordi
579579
casedatabase.Now().Sub(dbAgent.LastConnectedAt.Time)>agentInactiveDisconnectTimeout:
580580
// The connection died without updating the last connected.
581581
workspaceAgent.Status=codersdk.WorkspaceAgentDisconnected
582+
// Client code needs an accurate disconnected at if the agent has been inactive.
583+
workspaceAgent.DisconnectedAt=&dbAgent.LastConnectedAt.Time
582584
casedbAgent.LastConnectedAt.Valid:
583585
// The agent should be assumed connected if it's under inactivity timeouts
584586
// and last connected at has been properly set.

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp