Skip to content

Commit

Permalink
Merge pull request #275 from hhaensel/hh-websockets
Browse files Browse the repository at this point in the history
change clientside calculation of ws connection
  • Loading branch information
essenciary authored Sep 11, 2020
2 parents f51e821 + 39b0f7c commit 0bd2915
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 0bd2915

Please sign in to comment.