diff --git a/labs/bbb-webrtc-sfu/lib/base/BaseManager.js b/labs/bbb-webrtc-sfu/lib/base/BaseManager.js index 9e7320b2a0..8a88e671fc 100644 --- a/labs/bbb-webrtc-sfu/lib/base/BaseManager.js +++ b/labs/bbb-webrtc-sfu/lib/base/BaseManager.js @@ -137,7 +137,7 @@ module.exports = class BaseManager { } _handleError (logPrefix, connectionId, streamId, role, error) { - if (this._validateErrorMessage(error)) { + if (error && this._validateErrorMessage(error)) { return error; } diff --git a/labs/bbb-webrtc-sfu/lib/screenshare/ScreenshareManager.js b/labs/bbb-webrtc-sfu/lib/screenshare/ScreenshareManager.js index 2353a1fec8..0b42746094 100644 --- a/labs/bbb-webrtc-sfu/lib/screenshare/ScreenshareManager.js +++ b/labs/bbb-webrtc-sfu/lib/screenshare/ScreenshareManager.js @@ -135,7 +135,7 @@ module.exports = class ScreenshareManager extends BaseManager { } if (role === C.RECV_ROLE && session) { Logger.info(this._logPrefix, "Stopping viewer " + sessionId); - await session.stopViewer(message.connectionId); + await session.stopViewer(connectionId); } } }