From 6bc7270dfbb510d491664d3eb2610749fa97ace4 Mon Sep 17 00:00:00 2001 From: starnakin Date: Wed, 15 May 2024 16:36:44 +0200 Subject: [PATCH] bababoy --- django/frontend/static/js/api/Client.js | 2 +- django/frontend/static/js/api/Notice.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/django/frontend/static/js/api/Client.js b/django/frontend/static/js/api/Client.js index 9264be7..8030ec2 100644 --- a/django/frontend/static/js/api/Client.js +++ b/django/frontend/static/js/api/Client.js @@ -208,7 +208,7 @@ class Client else { this.me = undefined; - this.notice.stop(); + await this.notice.stop(); document.getElementById('navbarLoggedOut').classList.remove('d-none'); document.getElementById('navbarLoggedIn').classList.add('d-none'); document.getElementById('navbarDropdownButton').innerHTML = 'Me'; diff --git a/django/frontend/static/js/api/Notice.js b/django/frontend/static/js/api/Notice.js index ea4e739..a296d1a 100644 --- a/django/frontend/static/js/api/Notice.js +++ b/django/frontend/static/js/api/Notice.js @@ -47,10 +47,10 @@ export default class Notice { }; } - stop() { + async stop() { if (this._socket) { while (!this._socket.OPEN) - sleep(100); + await sleep(100); this._socket.close() this._socket = undefined; }