fix(scanner): if host or port not sent over stop the connection right away
This commit is contained in:
@@ -37,6 +37,10 @@ export class ScannerClient {
|
||||
}
|
||||
|
||||
private initialize() {
|
||||
if (!this.host || !this.port) {
|
||||
console.log("Host or port is missing");
|
||||
return;
|
||||
}
|
||||
this.socket.connect(this.port, this.host, () => {
|
||||
console.info("Connected to scanner");
|
||||
this.connected = true;
|
||||
|
||||
Reference in New Issue
Block a user