chore: Migrates rest of logging to fastify.

This commit is contained in:
greysoh 2024-06-02 11:16:59 -04:00
parent a99cf55aa1
commit a5381d0e25
Signed by: imterah
GPG key ID: 8FA7DD57BA6CEA37
5 changed files with 35 additions and 21 deletions

View file

@ -104,7 +104,7 @@ export class SSHBackendProvider implements BackendBaseClass {
}
if (this.sshInstance.connection) {
this.sshInstance.connection.on("end", async() => {
this.sshInstance.connection.on("end", async () => {
if (this.state != "started") return;
this.logs.push("We disconnected from the SSH server. Restarting...");
@ -121,10 +121,15 @@ export class SSHBackendProvider implements BackendBaseClass {
for (const proxy of proxies) {
if (!proxy.enabled) continue;
this.addConnection(proxy.sourceIP, proxy.sourcePort, proxy.destPort, "tcp");
this.addConnection(
proxy.sourceIP,
proxy.sourcePort,
proxy.destPort,
"tcp",
);
}
});
};
}
this.state = "started";
this.logs.push("Successfully started SSHBackendProvider.");