async onConnectionError({ state, dispatch, commit }, { hostname, error }) {
			if (error instanceof InvalidPasswordError) {
				logGlobal('error', i18n.t('events.connectionLost', [hostname]), error.message);
				await dispatch('disconnect', { hostname, doDisconnect: false });
				commit('askForPassword');
			} else if (state.isLocal) {
				logGlobal('error', i18n.t('events.connectionLost', [hostname]), error.message);
				commit('setTool', undefined)
				await dispatch('disconnect', { hostname, doDisconnect: false });
			} else {
				logGlobal('warning', i18n.t('events.reconnecting', [hostname]), error.message);
				dispatch(`machines/${hostname}/reconnect`);
				commit('setSelectedMachine', defaultMachine);
			}
		}
// Called when a machine cannot stay connected
Called when a machine cannot stay connected
Called when a machine cannot stay connected
async onConnectionError({ state, dispatch, commit }, { hostname, error }) {
			if (error instanceof InvalidPasswordError) {
				logGlobal('error', i18n.t('events.connectionLost', [hostname]), error.message);
				await dispatch('disconnect', { hostname, doDisconnect: false });
				commit('askForPassword');
			} else if (state.isLocal) {
				logGlobal('error', i18n.t('events.connectionLost', [hostname]), error.message);
				commit('setTool', undefined)
				await dispatch('disconnect', { hostname, doDisconnect: false });
			} else {
				logGlobal('warning', i18n.t('events.reconnecting', [hostname]), error.message);
				dispatch(`machines/${hostname}/reconnect`);
				commit('setSelectedMachine', defaultMachine);
			}
		}
async onConnectionError ( { state , dispatch , commit } , { hostname , error } ) { if ( error instanceof InvalidPasswordError ) { logGlobal ( 'error' , i18n . t ( 'events.connectionLost' , [ hostname ] ) , error . message ) ; await dispatch ( 'disconnect' , { hostname , doDisconnect : false } ) ; commit ( 'askForPassword' ) ; } else if ( state . isLocal ) { logGlobal ( 'error' , i18n . t ( 'events.connectionLost' , [ hostname ] ) , error . message ) ; commit ( 'setTool' , undefined ) await dispatch ( 'disconnect' , { hostname , doDisconnect : false } ) ; } else { logGlobal ( 'warning' , i18n . t ( 'events.reconnecting' , [ hostname ] ) , error . message ) ; dispatch ( ` ${ hostname } ` ) ; commit ( 'setSelectedMachine' , defaultMachine ) ; } }
Called when a machine cannot stay connected
Called when a machine cannot stay connected