Help Center/ Meeting/ Client SDK Reference/ FAQs/ Windows SDK/ What Should I Do If a Third-Party Client Needs to Wait for a Period of Time Before Exit When the Exit API Is Called?
Updated on 2024-07-30 GMT+08:00

What Should I Do If a Third-Party Client Needs to Wait for a Period of Time Before Exit When the Exit API Is Called?

Customer Case

A customer integrates the Windows SDK with their application. When the customer exits the application, the meeting process is still running, and the exit callback takes a long time.

Cause Analysis

The customer calls the exit API in the logout callback. The exit API destroys resources only after the logout callback is complete, but the logout callback will be complete after the exit API exits the application. As a result, a thread deadlock occurs, causing the preceding issue.

Solution

Call the exit API after the logout callback is complete, as shown in the following figure. For details about more API calling sequence, see API Call in Typical Scenarios.
Figure 1 API calling sequence diagram