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; }