Skip to content

Commit

Permalink
fix websocket init
Browse files Browse the repository at this point in the history
  • Loading branch information
manatlan committed Oct 13, 2024
1 parent adabb3e commit 1489a31
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions htagweb/runners.py
Original file line number Diff line number Diff line change
Expand Up @@ -290,8 +290,6 @@ async def handle(self, request,
""" % locals()
else:
# interactions use WS
protocol = "wss" if (request.url.scheme == "https") else "ws"

js = """%(jslib)s
async function interact( o ) {
Expand All @@ -303,7 +301,7 @@ async def handle(self, request,
let retryms=500;
function connect() {
_WS_= new WebSocket("%(protocol)s://"+location.host+"/_/%(fqn)s%(pparano)s");
_WS_= new WebSocket("//"+location.host+"/_/%(fqn)s%(pparano)s");
_WS_.onopen=function(evt) {
console.log("** WS connected")
document.body.classList.remove("htagoff");
Expand Down

0 comments on commit 1489a31

Please sign in to comment.