Skip to content

Commit 3828598

Browse files
committed
TraceServer: Remove extra server-exit stopOrReset
Before this fix, an extra stopOrReset was performed for nothing, upon stopping (thus exiting) the previously started server. This caused an extra (confusing) warning message being showed which was unrelated anyway. The latter was about not stopping, but this use case is truly about restarting the server. Contributes to fixing #8. Signed-off-by: Marco Miller <marco.miller@ericsson.com>
1 parent ba659b3 commit 3828598

1 file changed

Lines changed: 1 addition & 5 deletions

File tree

src/trace-server.ts

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ import * as vscode from 'vscode';
77
// -for naming consistency purposes across sibling extensions/settings:
88
const section = 'trace-server.traceserver';
99

10-
const exit = 'exit';
1110
const key = 'pid';
1211
const millis = 10000;
1312
const none = -1;
@@ -41,7 +40,7 @@ export class TraceServer {
4140
let id: NodeJS.Timeout;
4241
// recovering from workspaceState => no this.server set
4342
if (this.server) {
44-
this.server.once(exit, () => {
43+
this.server.once('exit', () => {
4544
this.showStatus(false);
4645
clearTimeout(id);
4746
});
@@ -144,9 +143,6 @@ export class TraceServer {
144143
while (true) {
145144
if (await this.isUp()) {
146145
this.showStatus(true);
147-
this.server?.once(exit, () => {
148-
this.stopOrReset(context);
149-
});
150146
clearTimeout(timeoutId);
151147
break;
152148
}

0 commit comments

Comments
 (0)