-
Notifications
You must be signed in to change notification settings - Fork 295
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
winrt/client: ignore session closed event during connect
As described in #1280, it is possible for a session to be closed then activated again while getting services. This will cause an OSError because the closed event triggers the disconnect cleanup code, then trying to use the session after that fails because it has been closed. This works around the problem by disabling the disconnect cleanup code until the connect method has returned successfully. If the connect method raises an exception, it handles cleanup already so the cleanup code in the session status event handler never gets called in this case.
- Loading branch information
Showing
2 changed files
with
9 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters