Skip to content

Commit

Permalink
hotfix
Browse files Browse the repository at this point in the history
forgot ':' in mtr-srv
added ws protocol for wsaddr
added logging
  • Loading branch information
blackjack4494 committed Nov 30, 2018
1 parent 1e6c5cb commit 628a8de
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
14 changes: 7 additions & 7 deletions index.alt.html
Original file line number Diff line number Diff line change
Expand Up @@ -92,14 +92,14 @@
response[i] = [];
}

ws = $websocket(document.getElementById('wsaddr').value);
/*
var url = new URL(window.location.href);
url.protocol = url.protocol.replace('http', 'ws');
url.href = url.href + "mtr"
*/
ws = $websocket('ws//' + document.getElementById('wsaddr').value);

//var url = new URL(window.location.href);
//url.protocol = url.protocol.replace('http', 'ws');
//url.href = url.href + "mtr"

//ws = $websocket(url.href);
console.log("log: ws " + ws);
//console.log("log: ws " + ws);
console.log("log: wsaddr " + document.getElementById('wsaddr').value);

ws.onMessage(function(message) {
Expand Down
4 changes: 2 additions & 2 deletions mtr-srv.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ def mtr_socket(ws):
mtr.terminate()
print 'disconnected'

if __name__ == '__main__'
if __name__ == '__main__':
app.run()

application = app
application = app

0 comments on commit 628a8de

Please sign in to comment.