File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
arduino-ide-extension/src/browser/theia/core Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -13,6 +13,7 @@ import {
1313import { ArduinoDaemon } from '../../../common/protocol' ;
1414import { NotificationCenter } from '../../notification-center' ;
1515import { nls } from '@theia/core/lib/common' ;
16+ import debounce = require( 'lodash.debounce' ) ;
1617
1718@injectable ( )
1819export class FrontendConnectionStatusService extends TheiaFrontendConnectionStatusService {
@@ -36,10 +37,11 @@ export class FrontendConnectionStatusService extends TheiaFrontendConnectionStat
3637 this . notificationCenter . onDaemonDidStop (
3738 ( ) => ( this . connectedPort = undefined )
3839 ) ;
39- this . wsConnectionProvider . onIncomingMessageActivity ( ( ) => {
40+ const refresh = debounce ( ( ) => {
4041 this . updateStatus ( ! ! this . connectedPort ) ;
4142 this . schedulePing ( ) ;
42- } ) ;
43+ } , this . options . offlineTimeout - 10 ) ;
44+ this . wsConnectionProvider . onIncomingMessageActivity ( ( ) => refresh ( ) ) ;
4345 }
4446}
4547
You can’t perform that action at this time.
0 commit comments