Skip to content

Commit

Permalink
change clientside calculation of ws connection
Browse files Browse the repository at this point in the history
  • Loading branch information
Helmut Haensel authored and Helmut Haensel committed Sep 11, 2020
1 parent de89b2e commit 39b0f7c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions files/embedded/channels.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Genie.WebChannels = {};
Genie.WebChannels.load_channels = function() {
var socket = new WebSocket('ws://' + window.Genie.Settings.server_host + ':' + window.Genie.Settings.websockets_port);
var socket = new WebSocket('ws://' + window.location.hostname + ':' + window.Genie.Settings.websockets_port);
var channels = Genie.WebChannels;

channels.channel = socket;
Expand Down Expand Up @@ -118,4 +118,4 @@ window.onbeforeunload = function() {
if ( Genie.Settings.webchannels_autosubscribe ) {
unsubscribe();
}
};
};

0 comments on commit 39b0f7c

Please sign in to comment.