Added missing MEDIA_SERVER_OFFLINE event and resolve

This commit is contained in:
prlanzarin 2018-07-10 17:21:26 +00:00
parent 9b0dfe8b98
commit 15270d07a1

View File

@ -32,11 +32,13 @@ module.exports = class MediaServer extends EventEmitter {
this._mediaServer = await this._getMediaServerClient(this._serverUri);
Logger.info("[mcs-media] Retrieved media server client => " + this._mediaServer);
this._monitorConnectionState();
resolve();
return resolve();
}
resolve();
}
catch (err) {
this._handleError(err);
this.emit(C.ERROR.MEDIA_SERVER_OFFLINE);
reject(err);
}
});