Skip to content

Commit f1c0b8f

Browse files
mustard-mhroboquat
authored andcommitted
[local-app] fix timeout chan no consumer
1 parent 34ed8e2 commit f1c0b8f

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

components/local-app/pkg/bastion/bastion.go

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -391,13 +391,17 @@ func (b *Bastion) handleUpdate(ur *WorkspaceUpdateRequest) {
391391
ws.cancel()
392392
delete(b.workspaces, u.ID)
393393
b.Callbacks.InstanceUpdate(ws)
394-
b.workspaceMapChangeChan <- len(b.workspaces)
394+
if b.localAppTimeout != 0 {
395+
b.workspaceMapChangeChan <- len(b.workspaces)
396+
}
395397
return
396398
}
397399

398400
b.workspaces[u.ID] = ws
399401
b.Callbacks.InstanceUpdate(ws)
400-
b.workspaceMapChangeChan <- len(b.workspaces)
402+
if b.localAppTimeout != 0 {
403+
b.workspaceMapChangeChan <- len(b.workspaces)
404+
}
401405
}
402406

403407
func generateSSHKeys(instanceID string) (privateKeyFN string, publicKey string, err error) {

0 commit comments

Comments
 (0)