forked from mafredri/cdp
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
WIP: session: Ignore DetachFromTarget error if target is gone (mafred…
…ri#110) rpcc.Conn.Close calls Target.DetachFromTarget before closing the websocket connection, which fails if the target is already closed. This is a bit inconvenient because we have to ignore errors from rpcc.Conn.Close when we close the target in advance, which means that we might miss other interesting errors. This change updates the detach function to ignore errors on Target.DetachFromTarget calls if it is because the target is already gone. Also adds a unit test to test this behavior. FIXME: The unit test still does not pass.
- Loading branch information
Showing
2 changed files
with
39 additions
and
0 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