Avoid race conditions between periodic timer and close sessions
am: 5b169b1722
Change-Id: Ibd7d1f58e4ba17dd29baee1a788193ffd17aa7c6
This commit is contained in:
@@ -72,6 +72,7 @@ CdmResponseType WvContentDecryptionModule::CloseSession(
|
||||
CdmEngine* cdm_engine = GetCdmForSessionId(session_id);
|
||||
// TODO(rfrias): Avoid reusing the error codes from CdmEngine.
|
||||
if (!cdm_engine) return SESSION_NOT_FOUND_1;
|
||||
AutoLock auto_lock(cdms_lock_);
|
||||
CdmResponseType sts = cdm_engine->CloseSession(session_id);
|
||||
cdm_engine->GetMetrics()->cdm_engine_close_session_.Increment(sts);
|
||||
if (sts == NO_ERROR) {
|
||||
|
||||
Reference in New Issue
Block a user