fix(scanner): if host or port not sent over stop the connection right away

This commit is contained in:
2026-02-16 19:04:04 -06:00
parent 44d0cb63cf
commit dc1d342799

View File

@@ -37,6 +37,10 @@ export class ScannerClient {
} }
private initialize() { private initialize() {
if (!this.host || !this.port) {
console.log("Host or port is missing");
return;
}
this.socket.connect(this.port, this.host, () => { this.socket.connect(this.port, this.host, () => {
console.info("Connected to scanner"); console.info("Connected to scanner");
this.connected = true; this.connected = true;