Skip to content

Commit fdd92af

Browse files
committed
sess: Log client connection/disconnection to R console
1 parent a93f756 commit fdd92af

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

sess/R/server.R

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ sess_app <- function(use_rstudioapi = TRUE, use_httpgd = TRUE) {
6969
onWSOpen = function(ws) {
7070
# Bind the active websocket to our environment
7171
.sess_env$ws <- ws
72+
cat("[sess] Client connected\n")
7273

7374
# Send the attach handshake immediately upon connection (JSON-RPC Notification)
7475
notify_client("attach", list(
@@ -99,6 +100,7 @@ sess_app <- function(use_rstudioapi = TRUE, use_httpgd = TRUE) {
99100

100101
ws$onClose(function() {
101102
.sess_env$ws <- NULL
103+
cat("[sess] Client disconnected\n")
102104
})
103105
}
104106
)

0 commit comments

Comments
 (0)