Skip to content

Commit

Permalink
End the /terminalsocket session when window is closed or /logout comm…
Browse files Browse the repository at this point in the history
…and issued
  • Loading branch information
gjsjohnmurray authored and nikitaeverywhere committed Jul 6, 2022
1 parent 11418e0 commit 9570c4f
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/cls/WebTerminal/Engine.cls
Original file line number Diff line number Diff line change
Expand Up @@ -189,8 +189,10 @@ Method ClientLoop() As %Status [ Private ]
for {
set message = ..GetMessage()
quit:(message = "") // if client is gone, finish looping
if (message.error) {
set st = ..Send("error", message.error)
if (message.error '= "") {
if (message.error '[ "ERROR #7951") { // don't try and send message if it was a WS close error
set st = ..Send("error", message.error)
}
quit
}
if (message."_cb" '= "") { set ..handler = message."_cb" }
Expand Down Expand Up @@ -250,6 +252,7 @@ Method Server() As %Status
do ..Send("oLocalized", "%wsRefuse(" _ authMessage _ ")")
}
do ..EndServer()
set %session.EndSession = 1
quit $$$OK
}

Expand Down

0 comments on commit 9570c4f

Please sign in to comment.