We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 0460b3d commit 72d57deCopy full SHA for 72d57de
1 file changed
R/session/vsc.R
@@ -962,8 +962,12 @@ print.hsearch <- function(x, ...) {
962
}
963
964
reg.finalizer(.GlobalEnv, function(e) {
965
- .vsc$request("detach")
966
- if (!is.na(request_tcp_connection)) {
967
- close(request_tcp_connection)
968
- }
+ # TODO: When exiting radian by EOF("CTRL+D") when coonecting to vsc by TCP,
+ # the TCP connection is getting closed before we're able to call detach...
+ tryCatch({
+ .vsc$request("detach")
969
+ if (!is.na(request_tcp_connection)) {
970
+ close(request_tcp_connection)
971
+ }
972
+ }, error = function(e) NULL)
973
}, onexit = TRUE)
0 commit comments