Skip to content

Commit 889eb07

Browse files
committed
mark the session as closed
from #45 (comment)
1 parent 4030b3a commit 889eb07

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

R/chromote_session.R

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,13 +86,14 @@ ChromoteSession <- R6Class(
8686
})
8787

8888
# When a target crashes, raise a warning.
89-
# The session cannot be closed because no session id is returned by the
90-
# Inspector.targetCrashed event
9189
if (!is.null(self$Inspector$targetCrashed)) {
9290
p <- p$
9391
then(function(value) {
9492
self$Inspector$targetCrashed(timeout_ = NULL, wait_ = FALSE, function(value) {
9593
warning("Chromote has received a Inspector.targetCrashed event. This means that the ChromoteSession has probably crashed.")
94+
# Even if no targetId nor sessionId is returned by Inspector.targetCashed
95+
# mark the session as closed. This will close all sessions..
96+
self$mark_closed()
9697
})
9798
})
9899
}

0 commit comments

Comments
 (0)