Skip to content

Commit

Permalink
un-hardcoding websocket connection to data bridge for non localhost d…
Browse files Browse the repository at this point in the history
…eployments

Should fix HVF#53 HVF#60 HVF#61 HVF#66
  • Loading branch information
Mark Gale committed Aug 9, 2019
1 parent e468dac commit 2b324fc
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/db/bridge.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import * as U from '../state/update'
import { UnmountClosed } from 'react-collapse'

const RETRY_INTERVAL = 1000
const BRIDGE_URL = 'ws://localhost:14645'

let clientConnectorSocket = null
let checkConnectorInterval
Expand All @@ -23,7 +22,7 @@ var bridgeAlive = true

function tryOpenBridge() {
try {
clientConnectorSocket = new WebSocket(BRIDGE_URL)
clientConnectorSocket = new WebSocket("ws://" + window.location.hostname + ":14645");
} catch (err) {
State.apply('connect', 'bridge_status', U.replace('mixed_fail'))
}
Expand Down

0 comments on commit 2b324fc

Please sign in to comment.