Skip to content

Commit 2b324fc

Browse files
author
Mark Gale
committed
un-hardcoding websocket connection to data bridge for non localhost deployments
Should fix HVF#53 HVF#60 HVF#61 HVF#66
1 parent e468dac commit 2b324fc

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/db/bridge.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ import * as U from '../state/update'
1010
import { UnmountClosed } from 'react-collapse'
1111

1212
const RETRY_INTERVAL = 1000
13-
const BRIDGE_URL = 'ws://localhost:14645'
1413

1514
let clientConnectorSocket = null
1615
let checkConnectorInterval
@@ -23,7 +22,7 @@ var bridgeAlive = true
2322

2423
function tryOpenBridge() {
2524
try {
26-
clientConnectorSocket = new WebSocket(BRIDGE_URL)
25+
clientConnectorSocket = new WebSocket("ws://" + window.location.hostname + ":14645");
2726
} catch (err) {
2827
State.apply('connect', 'bridge_status', U.replace('mixed_fail'))
2928
}

0 commit comments

Comments
 (0)