diff --git a/OpenCDMi/FrameworkRPC.cpp b/OpenCDMi/FrameworkRPC.cpp index 214d73cfa..a16febbf1 100644 --- a/OpenCDMi/FrameworkRPC.cpp +++ b/OpenCDMi/FrameworkRPC.cpp @@ -912,6 +912,13 @@ namespace Plugin { bool hadInitializationError = false; if (system != nullptr) { result = Exchange::OCDM_RESULT::OCDM_SUCCESS; + // Introduce response timeout on first call to simulate IPC failure + static int timeoutTestCounter = 0; + if (timeoutTestCounter == 0) { + timeoutTestCounter++; + TRACE_L1("Simulating response timeout for first CreateContext call"); + sleep(15); + } CDMi::IMediaKeysExt* systemExt = dynamic_cast(_parent.KeySystem(keySystem)); if (systemExt != nullptr) {