Skip to content

Commit 5c276a0

Browse files
committed
Avoid warnings during Android Frida cleanup
1 parent 51c8c97 commit 5c276a0

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/interceptors/frida/frida-android-interceptor.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -93,9 +93,11 @@ export class FridaAndroidInterceptor implements Interceptor {
9393
serverStream.destroy();
9494
});
9595

96-
await Promise.all(this.interceptedApps[proxyPort]?.map(async fridaSession => {
97-
await killProcess(fridaSession).catch(() => {});
98-
}));
96+
const fridaSessions = this.interceptedApps[proxyPort] ?? [];
97+
98+
await Promise.all(fridaSessions.map((session) =>
99+
killProcess(session).catch(() => {})
100+
));
99101
}
100102

101103
async deactivateAll(): Promise<void | {}> {

0 commit comments

Comments
 (0)