@@ -300,7 +300,7 @@ export class Runner<X extends AppConfig> implements IComponent {
300300
301301 if ( timeout ) {
302302 this . monitoringMessageReplyTimeout = setTimeout ( async ( ) => {
303- this . logger . warn ( "Monitoring Reply Timeout. Connected " ) ;
303+ this . logger . warn ( "Monitoring Reply Timeout" ) ;
304304
305305 await this . handleDisconnect ( ) ;
306306 } , timeout ) ;
@@ -324,7 +324,7 @@ export class Runner<X extends AppConfig> implements IComponent {
324324
325325 try {
326326 await this . hostClient . disconnect ( ! this . connected ) ;
327- await defer ( 5000 ) ;
327+ await defer ( 10000 ) ;
328328 } catch ( e ) {
329329 this . logger . error ( "Disconnect failed" ) ;
330330 }
@@ -392,8 +392,7 @@ export class Runner<X extends AppConfig> implements IComponent {
392392 }
393393
394394 private async exit ( exitCode ?: number ) {
395- //TODO: we need to wait a bit for the logs to flush - we shouldn't need to as cleanup should wait.
396- //await defer(200);
395+ await defer ( 200 ) ;
397396
398397 this . cleanup ( )
399398 . then ( ( code ) => { process . exitCode = exitCode || code ; } , ( e ) => console . error ( e ?. stack ) )
@@ -405,18 +404,16 @@ export class Runner<X extends AppConfig> implements IComponent {
405404
406405 try {
407406 this . logger . debug ( "connecting..." ) ;
408- await promiseTimeout ( this . hostClient . init ( this . instanceId ) , 5000 ) ;
407+ await promiseTimeout ( this . hostClient . init ( this . instanceId ) , 10000 ) ;
409408 this . logger . debug ( "connected" ) ;
410409 this . connected = true ;
411410
412- this . hostClient . inputStream . pipe ( this . logFile ! ) ;
413-
414411 await this . handleMonitoringRequest ( { monitoringRate : 1 } ) ;
415412 } catch ( e ) {
416413 this . connected = false ;
417414 this . logger . warn ( "Can't connect to Host" , e ) ;
418415
419- await defer ( 5000 ) ;
416+ await defer ( 10000 ) ;
420417
421418 return await this . premain ( ) ;
422419 }
@@ -464,7 +461,6 @@ export class Runner<X extends AppConfig> implements IComponent {
464461
465462 try {
466463 sequence = this . getSequence ( ) ;
467- // this.logger.debug("Sequence", sequence);
468464
469465 if ( sequence . length && typeof sequence [ 0 ] !== "function" ) {
470466 this . logger . debug ( "First Sequence object is not a function:" , sequence [ 0 ] ) ;
0 commit comments