Skip to content

Commit decf71a

Browse files
Check if logger process is still running prior to forcefully killing it (#339)
1 parent 14b5e23 commit decf71a

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

lib/device-log/ios-log.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -230,8 +230,10 @@ class IOSLog extends EventEmitter {
230230
try {
231231
await this.proc.stop('SIGTERM', 1000);
232232
} catch (e) {
233-
logger.error('Cannot stop log capture process. Sending SIGKILL...');
234-
await this.proc.stop('SIGKILL');
233+
if (this.proc.isRunning) {
234+
logger.warn('Cannot stop log capture process. Sending SIGKILL...');
235+
await this.proc.stop('SIGKILL');
236+
}
235237
}
236238
}
237239
}

0 commit comments

Comments
 (0)