Skip to content

Commit d138ed7

Browse files
fix(coderd): send updated workspace data adter ws connection (#9392)
1 parent a2be2f9 commit d138ed7

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

coderd/workspaces.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1028,6 +1028,9 @@ func (api *API) watchWorkspace(rw http.ResponseWriter, r *http.Request) {
10281028
_ = sendEvent(ctx, codersdk.ServerSentEvent{
10291029
Type: codersdk.ServerSentEventTypePing,
10301030
})
1031+
// Send updated workspace info after connection is established. This avoids
1032+
// missing updates if the client connects after an update.
1033+
sendUpdate(ctx, nil)
10311034

10321035
for {
10331036
select {

0 commit comments

Comments
 (0)