Skip to content

Commit 998c811

Browse files
authored
Merge pull request #2066 from NativeScript/raikov/fix-2061
Fixed: node processes increase after every change with debug --watch
2 parents 3487561 + 14c5897 commit 998c811

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

lib/services/ios-debug-service.ts

+7-1
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ class IOSDebugService implements IDebugService {
3838

3939
private _lldbProcess: ChildProcess;
4040
private _sockets: net.Socket[] = [];
41+
private _childProcess: ChildProcess;
4142

4243
public get platform(): string {
4344
return "ios";
@@ -85,11 +86,15 @@ class IOSDebugService implements IDebugService {
8586
socket.destroy();
8687
}
8788
this._sockets = [];
88-
if (this._lldbProcess) {
89+
if (this._lldbProcess) {
8990
this._lldbProcess.stdin.write("process detach\n");
9091
this._lldbProcess.kill();
9192
this._lldbProcess = undefined;
9293
}
94+
if (this._childProcess) {
95+
this._childProcess.kill();
96+
this._childProcess = undefined;
97+
}
9398
}).future<void>()();
9499
}
95100

@@ -108,6 +113,7 @@ class IOSDebugService implements IDebugService {
108113
skipInstall: this.$config.debugLivesync
109114
}).wait();
110115
let lineStream = byline(child_process.stdout);
116+
this._childProcess = child_process;
111117

112118
lineStream.on('data', (line: NodeBuffer) => {
113119
let lineText = line.toString();

0 commit comments

Comments
 (0)