File tree Expand file tree Collapse file tree 3 files changed +8
-4
lines changed
custom-typings/@james-proxy Expand file tree Collapse file tree 3 files changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -48,6 +48,8 @@ declare module '@james-proxy/james-browser-launcher' {
48
48
process : ChildProcess ;
49
49
stderr : stream . Readable ;
50
50
stdout : stream . Readable ;
51
+
52
+ stop ( ) : void ;
51
53
}
52
54
}
53
55
Original file line number Diff line number Diff line change @@ -66,8 +66,9 @@ export class FreshChrome {
66
66
async deactivate ( proxyPort : number ) {
67
67
if ( this . isActive ( proxyPort ) ) {
68
68
const browser = browsers [ proxyPort ] ;
69
- browser ! . process . kill ( ) ;
70
- await new Promise ( ( resolve ) => browser ! . process . once ( 'exit' , resolve ) ) ;
69
+ const exitPromise = new Promise ( ( resolve ) => browser ! . process . once ( 'exit' , resolve ) ) ;
70
+ browser ! . stop ( ) ;
71
+ await exitPromise ;
71
72
}
72
73
}
73
74
} ;
Original file line number Diff line number Diff line change @@ -100,8 +100,9 @@ export class FreshFirefox {
100
100
async deactivate ( proxyPort : number ) {
101
101
if ( this . isActive ( proxyPort ) ) {
102
102
const browser = browsers [ proxyPort ] ;
103
- browser ! . process . kill ( ) ;
104
- await new Promise ( ( resolve ) => browser ! . process . once ( 'exit' , resolve ) ) ;
103
+ const exitPromise = new Promise ( ( resolve ) => browser ! . process . once ( 'exit' , resolve ) ) ;
104
+ browser ! . stop ( ) ;
105
+ await exitPromise ;
105
106
}
106
107
}
107
108
} ;
You can’t perform that action at this time.
0 commit comments