Skip to content

Commit

Permalink
Listen on IPv6 as well (#1080)
Browse files Browse the repository at this point in the history
  • Loading branch information
raman325 committed Dec 9, 2023
1 parent caa0a96 commit ee96a79
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/lib/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -506,7 +506,6 @@ export class ZwavejsServer extends EventEmitter {
private sockets?: ClientsController;
private logger: Logger;
private defaultPort: number = 3000;
private defaultHost: string = "0.0.0.0";
private responder?: Responder;
private service?: CiaoService;
private remoteController: ZwavejsServerRemoteController;
Expand Down Expand Up @@ -548,8 +547,8 @@ export class ZwavejsServer extends EventEmitter {
this.wsServer.on("connection", (socket) => this.sockets!.addSocket(socket));

const port = this.options.port || this.defaultPort;
const host = this.options.host || this.defaultHost;
const localEndpointString = `${host}:${port}`;
const host = this.options.host;
const localEndpointString = `${host ?? "<all interfaces>"}:${port}`;

this.logger.debug(`Starting server on ${localEndpointString}`);

Expand Down

0 comments on commit ee96a79

Please sign in to comment.