mirror of
https://github.com/coder/coder.git
synced 2025-07-03 16:13:58 +00:00
fix(coderd): send updated workspace data adter ws connection (#9392)
This commit is contained in:
@ -1028,6 +1028,9 @@ func (api *API) watchWorkspace(rw http.ResponseWriter, r *http.Request) {
|
||||
_ = sendEvent(ctx, codersdk.ServerSentEvent{
|
||||
Type: codersdk.ServerSentEventTypePing,
|
||||
})
|
||||
// Send updated workspace info after connection is established. This avoids
|
||||
// missing updates if the client connects after an update.
|
||||
sendUpdate(ctx, nil)
|
||||
|
||||
for {
|
||||
select {
|
||||
|
Reference in New Issue
Block a user