File tree Expand file tree Collapse file tree 1 file changed +13
-7
lines changed
Expand file tree Collapse file tree 1 file changed +13
-7
lines changed Original file line number Diff line number Diff line change @@ -128,9 +128,13 @@ class IPCTransport extends EventEmitter {
128128 return ;
129129 }
130130 if ( data . cmd === 'AUTHORIZE' && data . evt !== 'ERROR' ) {
131- findEndpoint ( ) . then ( ( endpoint ) => {
132- this . client . request . endpoint = endpoint ;
133- } ) . catch ( ( error ) => this . client . emit ( 'error' , error ) ) ;
131+ findEndpoint ( )
132+ . then ( ( endpoint ) => {
133+ this . client . request . endpoint = endpoint ;
134+ } )
135+ . catch ( ( error ) => {
136+ this . client . emit ( 'error' , error ) ;
137+ } ) ;
134138 }
135139 this . emit ( 'message' , data ) ;
136140 break ;
@@ -144,17 +148,19 @@ class IPCTransport extends EventEmitter {
144148 } ) ;
145149 }
146150
147- onClose ( e ) {
148- this . emit ( 'close' , e ) ;
151+ onClose ( event ) {
152+ this . emit ( 'close' , event ) ;
149153 }
150154
151155 send ( data , op = OPCodes . FRAME ) {
152156 this . socket . write ( encode ( op , data ) ) ;
153157 }
154158
155159 async close ( ) {
156- return new Promise ( ( r ) => {
157- this . once ( 'close' , r ) ;
160+ return new Promise ( ( resolve ) => {
161+ this . once ( 'close' , ( ) => {
162+ resolve ( ) ;
163+ } ) ;
158164 this . send ( { } , OPCodes . CLOSE ) ;
159165 this . socket . end ( ) ;
160166 } ) ;
You can’t perform that action at this time.
0 commit comments