提交 300eea40 编写于 作者: R Rob Lourens

Fix typo

上级 78f73b97
...@@ -256,7 +256,7 @@ function sleep(seconds: number): Promise<void> { ...@@ -256,7 +256,7 @@ function sleep(seconds: number): Promise<void> {
}); });
} }
export const enum PersistenConnectionEventType { export const enum PersistentConnectionEventType {
ConnectionLost, ConnectionLost,
ReconnectionWait, ReconnectionWait,
ReconnectionRunning, ReconnectionRunning,
...@@ -264,22 +264,22 @@ export const enum PersistenConnectionEventType { ...@@ -264,22 +264,22 @@ export const enum PersistenConnectionEventType {
ConnectionGain ConnectionGain
} }
export class ConnectionLostEvent { export class ConnectionLostEvent {
public readonly type = PersistenConnectionEventType.ConnectionLost; public readonly type = PersistentConnectionEventType.ConnectionLost;
} }
export class ReconnectionWaitEvent { export class ReconnectionWaitEvent {
public readonly type = PersistenConnectionEventType.ReconnectionWait; public readonly type = PersistentConnectionEventType.ReconnectionWait;
constructor( constructor(
public readonly durationSeconds: number public readonly durationSeconds: number
) { } ) { }
} }
export class ReconnectionRunningEvent { export class ReconnectionRunningEvent {
public readonly type = PersistenConnectionEventType.ReconnectionRunning; public readonly type = PersistentConnectionEventType.ReconnectionRunning;
} }
export class ConnectionGainEvent { export class ConnectionGainEvent {
public readonly type = PersistenConnectionEventType.ConnectionGain; public readonly type = PersistentConnectionEventType.ConnectionGain;
} }
export class ReconnectionPermanentFailureEvent { export class ReconnectionPermanentFailureEvent {
public readonly type = PersistenConnectionEventType.ReconnectionPermanentFailure; public readonly type = PersistentConnectionEventType.ReconnectionPermanentFailure;
} }
export type PersistenConnectionEvent = ConnectionGainEvent | ConnectionLostEvent | ReconnectionWaitEvent | ReconnectionRunningEvent | ReconnectionPermanentFailureEvent; export type PersistenConnectionEvent = ConnectionGainEvent | ConnectionLostEvent | ReconnectionWaitEvent | ReconnectionRunningEvent | ReconnectionPermanentFailureEvent;
......
...@@ -30,7 +30,7 @@ import { ipcRenderer as ipc } from 'electron'; ...@@ -30,7 +30,7 @@ import { ipcRenderer as ipc } from 'electron';
import { IDiagnosticInfoOptions, IRemoteDiagnosticInfo } from 'vs/platform/diagnostics/common/diagnosticsService'; import { IDiagnosticInfoOptions, IRemoteDiagnosticInfo } from 'vs/platform/diagnostics/common/diagnosticsService';
import { IWorkbenchEnvironmentService } from 'vs/workbench/services/environment/common/environmentService'; import { IWorkbenchEnvironmentService } from 'vs/workbench/services/environment/common/environmentService';
import { IProgressService, IProgress, IProgressStep, ProgressLocation } from 'vs/platform/progress/common/progress'; import { IProgressService, IProgress, IProgressStep, ProgressLocation } from 'vs/platform/progress/common/progress';
import { PersistenConnectionEventType } from 'vs/platform/remote/common/remoteAgentConnection'; import { PersistentConnectionEventType } from 'vs/platform/remote/common/remoteAgentConnection';
import { IConfigurationService } from 'vs/platform/configuration/common/configuration'; import { IConfigurationService } from 'vs/platform/configuration/common/configuration';
import { IConfigurationRegistry, Extensions as ConfigurationExtensions } from 'vs/platform/configuration/common/configurationRegistry'; import { IConfigurationRegistry, Extensions as ConfigurationExtensions } from 'vs/platform/configuration/common/configurationRegistry';
import Severity from 'vs/base/common/severity'; import Severity from 'vs/base/common/severity';
...@@ -101,13 +101,13 @@ export class RemoteWindowActiveIndicator extends Disposable implements IWorkbenc ...@@ -101,13 +101,13 @@ export class RemoteWindowActiveIndicator extends Disposable implements IWorkbenc
if (connection) { if (connection) {
this._register(connection.onDidStateChange((e) => { this._register(connection.onDidStateChange((e) => {
switch (e.type) { switch (e.type) {
case PersistenConnectionEventType.ConnectionLost: case PersistentConnectionEventType.ConnectionLost:
case PersistenConnectionEventType.ReconnectionPermanentFailure: case PersistentConnectionEventType.ReconnectionPermanentFailure:
case PersistenConnectionEventType.ReconnectionRunning: case PersistentConnectionEventType.ReconnectionRunning:
case PersistenConnectionEventType.ReconnectionWait: case PersistentConnectionEventType.ReconnectionWait:
this.setDisconnected(true); this.setDisconnected(true);
break; break;
case PersistenConnectionEventType.ConnectionGain: case PersistentConnectionEventType.ConnectionGain:
this.setDisconnected(false); this.setDisconnected(false);
break; break;
} }
...@@ -298,7 +298,7 @@ class RemoteAgentConnectionStatusListener implements IWorkbenchContribution { ...@@ -298,7 +298,7 @@ class RemoteAgentConnectionStatusListener implements IWorkbenchContribution {
currentTimer = null; currentTimer = null;
} }
switch (e.type) { switch (e.type) {
case PersistenConnectionEventType.ConnectionLost: case PersistentConnectionEventType.ConnectionLost:
if (!currentProgressPromiseResolve) { if (!currentProgressPromiseResolve) {
let promise = new Promise<void>((resolve) => currentProgressPromiseResolve = resolve); let promise = new Promise<void>((resolve) => currentProgressPromiseResolve = resolve);
progressService!.withProgress( progressService!.withProgress(
...@@ -315,13 +315,13 @@ class RemoteAgentConnectionStatusListener implements IWorkbenchContribution { ...@@ -315,13 +315,13 @@ class RemoteAgentConnectionStatusListener implements IWorkbenchContribution {
progressReporter!.report(nls.localize('connectionLost', "Connection Lost")); progressReporter!.report(nls.localize('connectionLost', "Connection Lost"));
break; break;
case PersistenConnectionEventType.ReconnectionWait: case PersistentConnectionEventType.ReconnectionWait:
currentTimer = new ReconnectionTimer(progressReporter!, Date.now() + 1000 * e.durationSeconds); currentTimer = new ReconnectionTimer(progressReporter!, Date.now() + 1000 * e.durationSeconds);
break; break;
case PersistenConnectionEventType.ReconnectionRunning: case PersistentConnectionEventType.ReconnectionRunning:
progressReporter!.report(nls.localize('reconnectionRunning', "Attempting to reconnect...")); progressReporter!.report(nls.localize('reconnectionRunning', "Attempting to reconnect..."));
break; break;
case PersistenConnectionEventType.ReconnectionPermanentFailure: case PersistentConnectionEventType.ReconnectionPermanentFailure:
currentProgressPromiseResolve!(); currentProgressPromiseResolve!();
currentProgressPromiseResolve = null; currentProgressPromiseResolve = null;
progressReporter = null; progressReporter = null;
...@@ -333,7 +333,7 @@ class RemoteAgentConnectionStatusListener implements IWorkbenchContribution { ...@@ -333,7 +333,7 @@ class RemoteAgentConnectionStatusListener implements IWorkbenchContribution {
} }
}); });
break; break;
case PersistenConnectionEventType.ConnectionGain: case PersistentConnectionEventType.ConnectionGain:
currentProgressPromiseResolve!(); currentProgressPromiseResolve!();
currentProgressPromiseResolve = null; currentProgressPromiseResolve = null;
progressReporter = null; progressReporter = null;
......
...@@ -32,7 +32,7 @@ import { ExtensionHostProcessManager } from 'vs/workbench/services/extensions/co ...@@ -32,7 +32,7 @@ import { ExtensionHostProcessManager } from 'vs/workbench/services/extensions/co
import { ExtensionIdentifier, IExtension, ExtensionType, IExtensionDescription } from 'vs/platform/extensions/common/extensions'; import { ExtensionIdentifier, IExtension, ExtensionType, IExtensionDescription } from 'vs/platform/extensions/common/extensions';
import { Schemas } from 'vs/base/common/network'; import { Schemas } from 'vs/base/common/network';
import { IFileService } from 'vs/platform/files/common/files'; import { IFileService } from 'vs/platform/files/common/files';
import { PersistenConnectionEventType } from 'vs/platform/remote/common/remoteAgentConnection'; import { PersistentConnectionEventType } from 'vs/platform/remote/common/remoteAgentConnection';
import { IProductService } from 'vs/platform/product/common/product'; import { IProductService } from 'vs/platform/product/common/product';
import { Logger } from 'vs/workbench/services/extensions/common/extensionPoints'; import { Logger } from 'vs/workbench/services/extensions/common/extensionPoints';
...@@ -473,7 +473,7 @@ export class ExtensionService extends AbstractExtensionService implements IExten ...@@ -473,7 +473,7 @@ export class ExtensionService extends AbstractExtensionService implements IExten
if (!remoteAuthority) { if (!remoteAuthority) {
return; return;
} }
if (e.type === PersistenConnectionEventType.ConnectionLost) { if (e.type === PersistentConnectionEventType.ConnectionLost) {
this._remoteAuthorityResolverService.clearResolvedAuthority(remoteAuthority); this._remoteAuthorityResolverService.clearResolvedAuthority(remoteAuthority);
} }
}); });
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册