only connect to socket if path has been replaced, fixes #4776

This commit is contained in:
Zach Bloomquist
2019-07-23 10:17:01 -04:00
parent 9ca576a131
commit f179eda5ca
2 changed files with 4 additions and 1 deletions
+3 -1
View File
@@ -4,6 +4,7 @@ once = require("lodash/once")
Promise = require("bluebird")
{ client, circularParser } = require("@packages/socket/lib/browser")
HOST_PATH_REPLACED = false
HOST = "CHANGE_ME_HOST"
PATH = "CHANGE_ME_PATH"
@@ -70,7 +71,8 @@ connect = (host, path) ->
return ws
## initially connect
connect(HOST, PATH)
if HOST_PATH_REPLACED
connect(HOST, PATH)
automation = {
connect
+1
View File
@@ -23,6 +23,7 @@ module.exports = {
fs.readFileAsync(src, "utf8")
.then (str) ->
str
.replace("HOST_PATH_REPLACED = false", "HOST_PATH_REPLACED = true")
.replace("CHANGE_ME_HOST", host)
.replace("CHANGE_ME_PATH", path)