@@ -403,8 +403,15 @@ function handlers(app, opts, done){
403403 // .catch((err) => this._handleError(err));
404404 }
405405
406+ function rxClearTimeout ( ) {
407+ consoleStore . dispatch ( creators . rxClearTimeout ( ) ) ;
408+ }
409+
406410 function rxOff ( ) {
411+ const { rxtx } = consoleStore . getState ( ) ;
412+ const { offDuration } = rxtx ;
407413 consoleStore . dispatch ( creators . rxOff ( ) ) ;
414+ setTimeout ( rxClearTimeout , offDuration ) ;
408415 }
409416
410417 function rxOn ( ) {
@@ -414,13 +421,20 @@ function handlers(app, opts, done){
414421 let timeout ;
415422 if ( ! rxTimeout ) {
416423 timeout = setTimeout ( rxOff , duration ) ;
424+ consoleStore . dispatch ( creators . rxOn ( timeout ) ) ;
417425 }
418426
419- consoleStore . dispatch ( creators . rxOn ( timeout ) ) ;
427+ }
428+
429+ function txClearTimeout ( ) {
430+ consoleStore . dispatch ( creators . txClearTimeout ( ) ) ;
420431 }
421432
422433 function txOff ( ) {
434+ const { rxtx } = consoleStore . getState ( ) ;
435+ const { offDuration } = rxtx ;
423436 consoleStore . dispatch ( creators . txOff ( ) ) ;
437+ setTimeout ( txClearTimeout , offDuration ) ;
424438 }
425439
426440 function txOn ( ) {
@@ -430,9 +444,9 @@ function handlers(app, opts, done){
430444 let timeout ;
431445 if ( ! txTimeout ) {
432446 timeout = setTimeout ( txOff , duration ) ;
447+ consoleStore . dispatch ( creators . txOn ( timeout ) ) ;
433448 }
434449
435- consoleStore . dispatch ( creators . txOn ( timeout ) ) ;
436450 }
437451
438452 function updateDuration ( duration ) {
0 commit comments