提交 60720833 编写于 作者: J Johannes Rieken

💄 remove dead code

上级 90a7196d
......@@ -66,37 +66,6 @@ export const virtualMachineHint: { value(): number } = new class {
}
};
const mac = new class {
private _value: string;
get value(): string {
if (this._value === void 0) {
this._initValue();
}
return this._value;
}
private _initValue(): void {
this._value = null;
const interfaces = networkInterfaces();
for (let key in interfaces) {
for (const i of interfaces[key]) {
if (!i.internal) {
this._value = crypto.createHash('sha256').update(i.mac, 'utf8').digest('hex');
return;
}
}
}
this._value = `missing-${uuid.generateUuid()}`;
}
};
export function _futureMachineIdExperiment(): string {
return mac.value;
}
let machineId: TPromise<string>;
export function getMachineId(): TPromise<string> {
return machineId || (machineId = getMacMachineId()
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册