Call onClosed function if websocket is disconneced

This commit is contained in:
shortcutme 2019-07-01 16:27:20 +02:00
parent 900ae4e1ea
commit 841230fe80
No known key found for this signature in database
GPG key ID: 5B63BAE6CB9613AE

View file

@ -91,6 +91,11 @@ class UiWebsocket(object):
if not self.hasPlugin("Multiuser"): if not self.hasPlugin("Multiuser"):
self.cmd("error", "Internal error: %s" % Debug.formatException(err, "html")) self.cmd("error", "Internal error: %s" % Debug.formatException(err, "html"))
self.onClosed()
def onClosed(self):
pass
def dedent(self, text): def dedent(self, text):
return re.sub("[\\r\\n\\x20\\t]+", " ", text.strip().replace("<br>", " ")) return re.sub("[\\r\\n\\x20\\t]+", " ", text.strip().replace("<br>", " "))