File tree 1 file changed +6
-3
lines changed
components/local-app/pkg/bastion
1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -142,7 +142,10 @@ func (b *Bastion) fullUpdate(uchan chan<- *gitpod.WorkspaceInstance) {
142
142
func (b * Bastion ) acceptUpdates (updates chan * gitpod.WorkspaceInstance ) {
143
143
for u := range updates {
144
144
ws , ok := b .workspaces [u .ID ]
145
- if ! ok && u .Status .Phase != "stopping" {
145
+ if ! ok {
146
+ if u .Status .Phase == "stopping" || u .Status .Phase == "stopped" {
147
+ continue
148
+ }
146
149
ctx , cancel := context .WithCancel (b .ctx )
147
150
ws = & Workspace {
148
151
WorkspaceID : u .WorkspaceID ,
@@ -179,11 +182,11 @@ func (b *Bastion) acceptUpdates(updates chan *gitpod.WorkspaceInstance) {
179
182
}
180
183
}
181
184
182
- case "stopping" :
185
+ case "stopping" , "stopped" :
183
186
ws .cancel ()
184
187
delete (b .workspaces , ws .WorkspaceID )
185
188
b .Callbacks .InstanceUpdate (ws )
186
- return
189
+ continue
187
190
}
188
191
189
192
b .workspaces [u .ID ] = ws
You can’t perform that action at this time.
0 commit comments