From a64bbb163564310573a9e72494a4dbfdba9b9db7 Mon Sep 17 00:00:00 2001 From: Bryan Ashby Date: Fri, 27 Nov 2020 23:01:05 -0700 Subject: [PATCH] * Don't crash attempting to get desc from menu stack * Remove ring buffer monitor at WFC exit --- core/client_connections.js | 10 +++++++++- core/wfc.js | 4 ++++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/core/client_connections.js b/core/client_connections.js index 744f1f2a..393446b3 100644 --- a/core/client_connections.js +++ b/core/client_connections.js @@ -36,11 +36,19 @@ function getActiveConnectionList(authUsersOnly) { const now = moment(); return _.map(getActiveConnections(authUsersOnly), ac => { + let action; + try { + // attempting to fetch a bad menu stack item can blow up/assert + action = _.get(ac, 'currentMenuModule.menuConfig.desc', 'Unknown'); + } catch(e) { + action = 'Unknown'; + } + const entry = { node : ac.node, authenticated : ac.user.isAuthenticated(), userId : ac.user.userId, - action : _.get(ac, 'currentMenuModule.menuConfig.desc', 'Unknown'), + action : action, serverName : ac.session.serverName, isSecure : ac.session.isSecure, }; diff --git a/core/wfc.js b/core/wfc.js index 65db0df2..4f8dedb8 100644 --- a/core/wfc.js +++ b/core/wfc.js @@ -103,6 +103,10 @@ exports.getModule = class WaitingForCallerModule extends MenuModule { } leave() { + _.remove(Log.log.streams, stream => { + return stream.name === 'wfc-ringbuffer'; + }); + this._stopRefreshing(); super.leave();