refactor: Use TCP_DEFAULT_PORT as default instead of using a boolean check

This commit is contained in:
Pieter Scheffers
2023-11-16 11:26:44 +01:00
parent fc2194028d
commit 0cbc15405d

View File

@@ -40,7 +40,7 @@ export class ServerTCP extends Server implements CustomTransportStrategy {
constructor(private readonly options: TcpOptions['options']) {
super();
this.port = this.getOptionsProp(options, 'port') || TCP_DEFAULT_PORT;
this.port = this.getOptionsProp(options, 'port', TCP_DEFAULT_PORT);
this.host = this.getOptionsProp(options, 'host') || TCP_DEFAULT_HOST;
this.socketClass =
this.getOptionsProp(options, 'socketClass') || JsonSocket;