forked from mbk-lab/rui_orig
2
0
Fork 0

upstream: Bug fixing

This commit is contained in:
Роман Бородин 2024-04-12 15:52:58 +03:00
parent 882e9bcce3
commit 08dc88ca86
2 changed files with 5 additions and 8 deletions

View File

@ -156,14 +156,7 @@ func (app *application) socketReader(bridge webBridge) {
ErrorLog(`"session" key not found`) ErrorLog(`"session" key not found`)
} }
answer := "" bridge.writeMessage("restartSession();")
if session, answer = app.startSession(obj, events, bridge); session != nil {
if !bridge.writeMessage(answer) {
return
}
session.onStart()
go sessionEventHandler(session, events, bridge)
}
case "answer": case "answer":
session.handleAnswer(obj) session.handleAnswer(obj)

View File

@ -73,6 +73,10 @@ function sessionInfo() {
return message + "}"; return message + "}";
} }
function restartSession() {
sendMessage( sessionInfo() );
}
function getIntAttribute(element, tag) { function getIntAttribute(element, tag) {
let value = element.getAttribute(tag); let value = element.getAttribute(tag);
if (value) { if (value) {