Skip to content

Commit

Permalink
removed unused vars, linting
Browse files Browse the repository at this point in the history
  • Loading branch information
srieger1 committed Sep 6, 2023
1 parent 35d38d0 commit fbacd0c
Showing 1 changed file with 9 additions and 11 deletions.
20 changes: 9 additions & 11 deletions backend/src/providers/FirecrackerProvider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -111,10 +111,8 @@ class microVM {
);
}

const microVM = this;

this.microVMInstance.process.on("exit", async function (code, signal) {
await fs.unlink(microVM.socketPath).catch(async (err) => {
this.microVMInstance.process.on("exit", async function () {
await fs.unlink(this.socketPath).catch(async (err) => {
if ("ENOENT" !== err.code) {
return reject(
new Error(
Expand All @@ -124,11 +122,11 @@ class microVM {
}
// if ENOENT, file does not exist as intended
});
microVM.microVMInstance.process = undefined;
this.microVMInstance.process = undefined;
});

this.microVMInstance.process.on("close", async function (code, signal) {
await fs.unlink(microVM.socketPath).catch(async (err) => {
this.microVMInstance.process.on("close", async function () {
await fs.unlink(this.socketPath).catch(async (err) => {
if ("ENOENT" !== err.code) {
return reject(
new Error(
Expand All @@ -138,11 +136,11 @@ class microVM {
}
// if ENOENT, file does not exist as intended
});
microVM.microVMInstance.process = undefined;
this.microVMInstance.process = undefined;
});

this.microVMInstance.process.on("error", async function (err) {
await fs.unlink(microVM.socketPath).catch(async (err) => {
this.microVMInstance.process.on("error", async function () {
await fs.unlink(this.socketPath).catch(async (err) => {
if ("ENOENT" !== err.code) {
return reject(
new Error(
Expand Down Expand Up @@ -785,4 +783,4 @@ export default class FirecrackerProvider implements InstanceProvider {
setTimeout(resolve, ms);
});
}
}
}

0 comments on commit fbacd0c

Please sign in to comment.