Fixed exceptions on screenshare early exit

This commit is contained in:
prlanzarin 2018-09-11 20:08:15 +00:00
parent e327625b64
commit dedffa9de2
2 changed files with 2 additions and 2 deletions

View File

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

View File

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