Skip to content

Commit 94f3b38

Browse files
geroplroboquat
authored andcommitted
[dashboard] Fix broken client.dispose()
1 parent 8a66b79 commit 94f3b38

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

components/gitpod-protocol/src/gitpod-service.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -383,10 +383,12 @@ export class GitpodCompositeClient<Client extends GitpodClient> implements Gitpo
383383

384384
public registerClient(client: Partial<Client>): Disposable {
385385
this.clients.push(client);
386-
const index = this.clients.length;
387386
return {
388387
dispose: () => {
389-
this.clients.slice(index, 1);
388+
const index = this.clients.indexOf(client);
389+
if (index > -1) {
390+
this.clients.splice(index, 1);
391+
}
390392
}
391393
}
392394
}
@@ -576,7 +578,7 @@ export class WorkspaceInstanceUpdateListener {
576578
}
577579

578580
export interface GitpodServiceOptions {
579-
onReconnect?: () => (void | Promise<void>)
581+
onReconnect?: () => (void | Promise<void>)
580582
}
581583

582584
export class GitpodServiceImpl<Client extends GitpodClient, Server extends GitpodServer> {

0 commit comments

Comments
 (0)