From ae5e2ff60da1b001d558be065522b0bd903f96ec Mon Sep 17 00:00:00 2001 From: Alexey Orlenko Date: Tue, 30 May 2017 00:44:50 +0300 Subject: [PATCH] tcp: fixup "fix listening on port 0" PR-URL: https://github.com/metarhia/jstp/pull/191 Refs: https://github.com/metarhia/jstp/pull/189 Reviewed-By: Denys Otrishko --- lib/transport.tcp.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/transport.tcp.js b/lib/transport.tcp.js index 075b6dd..4b8a9b1 100644 --- a/lib/transport.tcp.js +++ b/lib/transport.tcp.js @@ -15,7 +15,7 @@ tcp.createServer = (config, applications, authCallback) => { if (typeof(config) === 'number') { config = { port: config }; } - if (!config.port) { + if (config.port === undefined) { throw new Error('Port number must be specified'); } if (config.path) {