From d2f54e8c8d30257689f2e533da6b1aa2b79c7606 Mon Sep 17 00:00:00 2001 From: Rodrigo Nascimento Date: Thu, 11 May 2017 16:27:59 -0300 Subject: [PATCH] [FIX] Remove spaces from env PORT and INSTANCE_IP --- server/startup/presence.js | 4 ++-- server/stream/streamBroadcast.js | 3 +++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/server/startup/presence.js b/server/startup/presence.js index f8248e9c3d7b..59d2a3c94a06 100644 --- a/server/startup/presence.js +++ b/server/startup/presence.js @@ -3,11 +3,11 @@ Meteor.startup(function() { const instance = { host: 'localhost', - port: process.env.PORT + port: String(process.env.PORT).trim() }; if (process.env.INSTANCE_IP) { - instance.host = process.env.INSTANCE_IP; + instance.host = String(process.env.INSTANCE_IP).trim(); } InstanceStatus.registerInstance('rocket.chat', instance); diff --git a/server/stream/streamBroadcast.js b/server/stream/streamBroadcast.js index b9b43639eae8..321bdc72b540 100644 --- a/server/stream/streamBroadcast.js +++ b/server/stream/streamBroadcast.js @@ -2,6 +2,9 @@ import {DDPCommon} from 'meteor/ddp-common'; +process.env.PORT = String(process.env.PORT).trim(); +process.env.INSTANCE_IP = String(process.env.INSTANCE_IP).trim(); + const connections = {}; this.connections = connections;