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' {
4848 process : ChildProcess ;
4949 stderr : stream . Readable ;
5050 stdout : stream . Readable ;
51+
52+ stop ( ) : void ;
5153 }
5254 }
5355
Original file line number Diff line number Diff line change @@ -66,8 +66,9 @@ export class FreshChrome {
6666 async deactivate ( proxyPort : number ) {
6767 if ( this . isActive ( proxyPort ) ) {
6868 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 ;
7172 }
7273 }
7374} ;
Original file line number Diff line number Diff line change @@ -100,8 +100,9 @@ export class FreshFirefox {
100100 async deactivate ( proxyPort : number ) {
101101 if ( this . isActive ( proxyPort ) ) {
102102 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 ;
105106 }
106107 }
107108} ;
You can’t perform that action at this time.
0 commit comments