We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2ad4df7 commit 1ab4207Copy full SHA for 1ab4207
src/interceptors/electron.ts
@@ -185,9 +185,12 @@ export class ElectronInterceptor implements Interceptor {
185
186
if (!shutdown) {
187
// Didn't shutdown yet? Inject a hard exit.
188
- await debugClient.Runtime.evaluate({
189
- expression: 'process.exit(0)'
190
- }).catch(() => {}) // Ignore errors (there's an inherent race here)
+ await Promise.race([
+ debugClient.Runtime.evaluate({
+ expression: 'process.exit(0)'
191
+ }).catch(() => {}), // Ignore errors (there's an inherent race here)
192
+ disconnectPromise // If we disconnect, evaluate can time out
193
+ ]);
194
};
195
})
196
);
0 commit comments